- Plesk for Linux
Sites 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.net/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.
Connect to the server via SSH.
- Check the current connections limit:
# mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow ` variables | grep 'max.*connections'
| max_connections | 100 |
/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"