database error when too much traffic
-
My site gets a fair amount of traffic and in the past there has never been an issue, i am on a dedciated server and use the Zherald theme.
However the Zherald theme, wordpress 2.71 and the widgets i use have all been in use without any errors in the past.
The error i get is that once i get to approx 150 users online at the same time i get Error establishing a database connection
Now i have contacted my hosting company hostgator many times about this and they say it is because of sleeping connections, they wrote this:
The page is now loading but there are a large number of sleeping connections which is causing the site to sometimes hit the 30 max_user_connections is why it loads for you sometimes and other times not. You will need to investigate into the wordpress install you have and its plugins to determine where the sleeping processes are coming from as this is what is causing the messages about not being able to connect to the database:
mysql> use xxxxxxxxxxx;
No connection. Trying to reconnect…
ERROR 1203 (42000): User xxxxxxxxx already has more than ‘max_user_connections’ active connections
ERROR:
Can’t connect to the servermysql>
I removed every singled widget and tested the site again at peak times and the error keeps coming up, so i emailed them again and asked them to raise the amount of connections i can have
They responded
Hello,
I have increased the max_user_connections to 50 but I highly recommend you look into why wordpress is doing this. It’s causing MySQL to have numerous sleeping connections and this is what’s causing the issue. These connections shouldn’t be necessary so I recommend looking into what’s causing this.SO thats the status, can anyone give me any reason why this is happening, what can cause the sleeping connections.
Thanks
The topic ‘database error when too much traffic’ is closed to new replies.