MySQL: Too Many Connections Error

Check status:

SHOW STATUS WHERE variable_name = "Threads_connected";
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| Threads_connected | 42    |
+-------------------+-------+

Check config:

SHOW VARIABLES WHERE variable_name = "max_connections";
SHOW VARIABLES LIKE "max_conn%";

Default max_connections config is 151.

+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+

Check current process list:

SHOW PROCESSLIST;

By the end of the line you will get the total connections.

134 rows in set (0.002 sec)

Set new max_connection value:

SET GLOBAL VARIABLE max_connections=201;

References:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *