Admin-Ahead Community

Linux => Control Panels => Plesk => Topic started by: rohitj on December 28, 2013, 10:59:18 pm

Title: "Too many connections" error in Plesk interface
Post by: rohitj on December 28, 2013, 10:59:18 pm
"Too many connections" error in Plesk interface

Following errors pop-up occasionally in Plesk interface:

Unable to connect to database: Too many connections

SQLSTATE[08004] [1040] Too many connections


This error means that the limit of simultaneous connections to the MySQL server has been reached and that new connections to the server cannot be established at this time.

The MySQL server status can be checked using the "mysqladmin" utility. For example, to find out the number of current connections to the server, use:

Code: [Select]
# mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` extended-status | grep Max_used_connections
| Max_used_connections | 11 |


The current connections limit settings can be found using:

Code: [Select]
# mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow ` variables | grep 'max.*connections'
| max_connections | 100 |
| max_user_connections | 30

The issue can be resolved by increasing the max_user_connections and max_connections in /etc/my.cnf file and restart mysql.

Code: [Select]
root:~# /etc/init.d/mysqld restart
Done   8)