Establishing database connection

asked Feb 27, 2014 in Shared Hosting by Mrnewguy (440 points)
Hi all
I have a WordPress site and I have been getting the error message “establishing database connection" every few hours on my VPS. I am using WP 3.8.1 and I have nginx and php5-fpminstalledon  unix socket. I checked my mysql credentials, and my logs looking for causes of this error with no luck.
I found this line in my log "mysql server has gone away"  
what should I do?
Can anyone please help

1 Answer

0 like 0 dislike
answered Feb 27, 2014 by tareq101 (4,880 points)
This means that you are approaching the maximum user connections for the mysql or maximum connections for the Mysql. When you get this error, login via ssh and see how check the number of connections on the database. Then go to /etc/my.cnf  (this is the mysql configuration) and see what you have for the max_user_connections and the max_connections.