Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14611 reviews 1734 hosting providers

Questions & Answers

Establishing database connection

Feb 28, 2014 by Mrnewguy
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 votes
Feb 28, 2014 by tareq101
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.