Thursday, February 21, 2013

"Too many connections" - Error when trying to connect to Mysql


If you get "Too many connections" error when trying to connect to Mysql Server that means all available connections have been allocated and used by other clients.


Actually the number of connections is limited by max_connections variable. To whatever value this variable is set, that many connections can be opened by clients to mysql. In actual it is set to max_connections + 1. The +1 is actually reserved for the Super User so that they can login to mysql and troubleshoot problems even if the usable connections have exhausted. 

The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform, the amount of RAM available, how much RAM is used for each connection, the workload from each connection, and the desired response time.


No comments:

Post a Comment