- Plesk for Linux
Sites on Plesk server are opened very slowly or the errors below occur:
CONFIG_TEXT: Link to database can not be established: SQLSTATE [HY000]  Lost connection to MySQL server at 'waiting for initial communication packet', system error: 95
Link to database can not be established: SQLSTATE [HY000]  Too many connections
CONFIG_TEXT: NOTICE: PHP message: PHP Warning: mysqli_real_connect(): (08004/1040): Too many connections in /var/www/vhosts/example.com/httpdocs/wp-includes/wp-db.php on line 1531
The number of connections permitted is controlled by the max_connections system variable.
Increase the value of the max_connections variable.
Note: if direct SSH access to the server is not possible, contact server administrator for further assistance.
Connect to the server via SSH.
- Run the command below and check the current connections limit:
# plesk db "show variables " | grep max_connections
/etc/my.cnffile in a favorite text editor and increase the value of max_connections variable:
Restart mysqld after to apply changings.
# service mysql restart
For more details check the MySQL reference manual "Too many connections"