Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django does not correctly close MySQL connections #177

Open
CarolinaFernandez opened this issue Nov 4, 2013 · 0 comments
Open

Django does not correctly close MySQL connections #177

CarolinaFernandez opened this issue Nov 4, 2013 · 0 comments

Comments

@CarolinaFernandez
Copy link
Member

While investigating a bit the source of the problems of the AMs that were disconnected after some time, we obtained the following from an OF AM:

Aggregate Manager *** was unreachable at [[ 08:47:03 PST ]] the cause 
was: <ProtocolError for xxx:yyy@zzz:www: 500 Internal Server Error>

After checking the opt-in manager log:

[Mon Nov 04 09:49:56 2013] [error] [client zzz] OperationalError: (1040, 
'Too many connections')

which is related to [1]

The maximum number of MySQL connections is 151 at a time. For some reason, Django ORM does not properly close these on opt-in manager.

To check how many connections are open in MySQL:

mysql> show processlist;

At this point there are at least two quick fixes:

(a) restart the mysql server daemon so as to flush the zombie connections
(b) increase "max_connections" variable to some higher value, for example 200 (see [1])

[1] https://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html

but we still need...

To search for a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant