WebFaction
Community site: login faq

I got tons of errors few minutes ago in my Django application on Web210:

Traceback (most recent call last):

 File "/home/eden/webapps/vikendi/lib/python2.7/django/core/handlers/base.py", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/home/eden/webapps/vikendi/vikendi/main/common.py", line 23, in frontpage
   if r.count() != 0:

 File "/home/eden/webapps/vikendi/lib/python2.7/django/db/models/query.py", line 334, in count
   return self.query.get_count(using=self.db)

 File "/home/eden/webapps/vikendi/lib/python2.7/django/db/models/sql/query.py", line 401, in get_count
   number = obj.get_aggregation(using=using)[None]

 File "/home/eden/webapps/vikendi/lib/python2.7/django/db/models/sql/query.py", line 367, in get_aggregation
   result = query.get_compiler(using).execute_sql(SINGLE)

 File "/home/eden/webapps/vikendi/lib/python2.7/django/db/models/sql/compiler.py", line 734, in execute_sql
   cursor = self.connection.cursor()

 File "/home/eden/webapps/vikendi/lib/python2.7/django/db/backends/__init__.py", line 252, in cursor
   cursor = util.CursorWrapper(self._cursor(), self)

 File "/home/eden/webapps/vikendi/lib/python2.7/django/db/backends/mysql/base.py", line 322, in _cursor
   self.connection = Database.connect(**kwargs)

 File "/usr/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
   return Connection(*args, **kwargs)

 File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 187, in __init__
   super(Connection, self).__init__(*args, **kwargs2)

OperationalError: (1203, "User eden_vikendi already has more than 'max_user_connections' active connections")

This error never happened before. Maybe has something to do with the new server settings (web210) since I migrated from the old server (web31) few days ago?

asked 27 Jul '11, 04:09

eden
88615
accept rate: 0%


Hi,

The max_user_connections variable is set to 30 both on web31 and on web210, so I doubt this is due to any server settings.

Generally, this means that there are more than 30 simultaneous connections open for your database at any given time. This is a reasonable limit and shouldn't be normally triggered even with a very busy website. It is possible that the app you are using is not optimized and opens a lot of MySQL connections.

If this happens again, you can open a ticket and ask tech support for assistance with finding out the cause.

permanent link

answered 27 Jul '11, 04:33

todork
1.2k5
accept rate: 34%

This application has been running on web31 more than one year and above error never happened. Now I'm looking at the logs and I see a lot of requests from 123.159.242.72 (somewhere in China?) just within a few seconds. This is the moment when the error appeared. It looks like an attack.

Anyway, thanks for the help.

(27 Jul '11, 07:03) eden

You are welcome.

You're right that this could be an attack. It could also be a faulty browser refreshing a page multiple times, or a web bot hitting a publicly accessible page that performs MySQL queries.

(27 Jul '11, 07:11) todork
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×910
×168

question asked: 27 Jul '11, 04:09

question was seen: 7,870 times

last updated: 27 Jul '11, 07:11

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM