Forums

MySQL Max Users

Something is creating sleep commands to our MySQL server and locking us out due to the max user connection limit. Is there anyway to trace what is creating these sleep commands?

Run SHOW PROCESSLIST from a MySQL console (which, of course, you should open before the connection limit is reached). That should tell you.

Once I've identified the process using SHOW PROCESSLIST is there a good way to identify where these processes are being generated?

The "Info" column shows the query it's running, that might provide some clues?

That's the thing, these are Sleep commands not querys so the Info column isn't much help.

No clues there then!

Short of a line-by-line code analysis, I'm not sure what to suggest. Are you using any kind of ORM to manage your database connections? SQLAlchemy does quite a good job, if you need one...