Home| Download |Features |WebTuna Analytics |Knowledge Base |Buy
 
MySQL Too many connections

MySQL Too Many Connections



If you get a "Too many connections" error when you try to connect to the mysqld server, this means that all available connections are in use by database clients.

The number of connections allowed is controlled by the max_connections system variable. Its default value is 100. If you need to support more connections, you should set a larger value for this variable.

mysqld actually allows max_connections+1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege. Your DBTuna user should have SUPER privilege, which means that the current screen within DBTuna will highlight the issue with Too many connections (as displayed in the screenshot above).

According to MySQL, "the maximum number of connections MySQL can support depends on the quality of the thread library on a given platform. Linux or Solaris should be able to support 500-1000 simultaneous connections, depending on how much RAM you have and what your clients are doing. Static Linux binaries provided by MySQL AB can support up to 4000 connections".

You should also research the best approach to mysql connection handling supported by your language (e.g. PHP, Java etc.) or 3rd Party DB Library (e.g. Pear etc.). In MySQL it is relatively easy to create and destroy connections, therefore connection pooling is not always the best option. It may be best to open a new connection for a client request and then explicitly close the connection at the end of the request.


 
Next Step - Improve Your Database Performance now with DBTuna: REQUEST A DEMO START A FREE TRIAL
Share/Bookmark
Feedback Form