Question:
How to resolve too many mysql connections
On the mysql command line:
The following two commans are useful to determine current connections:
-
SHOW STATUS WHERE `variable_name` = 'Threads_connected';
-
SHOW PROCESSLIST;
Centos prompt
You may update the mysql configuration which is located under /etc/my.cnf.
Two variables you may like to review are:
-
max_connections = 256
-
max_allowed_packet - 32M
For changes to the /etc/my.cnf to take effect you will need to reboot your server. In this instance restarting the http daemon is not sufficient.
Taxonomy: