2

http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html

States that there is 1 connection beyond your maximum number of connections for users with the super privilege.

My question is can you increase that number? Eventually I want to put limits in for all users that leave additional connections open for administrative jobs, but I'm not in a position to do that right now.

I want to increase that number to 10 so I can have replication jobs and monitoring jobs not affected by application connections.

1
  • I would like to have two for the sole purpose of that Workbench sometimes uses a second connection to show active connections, while leaving one connections for my queries. This helps me debug better when max_connections is reached
    – nl-x
    Dec 16, 2019 at 14:15

1 Answer 1

1

Is there some sort of sane upper limit any one user should never exceed? Maybe your busiest application has at most 20 open connections during peak normal operation. Let's assume you have 20 non root users.

set max_user_connections = 30 (to give a bit of a safe buffer)

set max_connections = max_user_connections * # users + extra buffer, 
   or 30 * 20 + 50 = 650 max connections.  

This way your global max connections is safe from every getting reached and there should always be room for you to get in even if one particularly application or user is getting maxed out.

1
  • No there isn't.
    – xaxxon
    Dec 16, 2019 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.