• 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 server

    mysql>

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m experiencing a similar problem. When I try to check my site via hyperspin.com I get 6 Error 500 Internal Server Errors. After investigating it turns out that the MySQL error in this case is: User xxxxxxxxx already has more than ‘max_user_connections’ active connections.

    Any suggestions?

    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.

    50 is not that high…

    Considering you’re on a dedicated server i think you should be in a position to set this to whatever you want… Why is the host making this change?

    If when you say dedicated you mean you’re own website then you may mean a shared host, and 50 is likely to be about the limit they’ll give you whilst on shared hosting (varies between hosts)… as you’ll likely be taking up a big chunk of the server’s resouces..

    I am also having this problem all of a sudden. I’ve made quite a few changes to wordpress and my host tells me the problems started recently. I’ve removed all the plugins I’ve added recently and reverted all the code. I still have the same issue. It has to be happening automatically because it happens with no traffic at all.

    After updating wordpress the problem seems to have resolved itself. jablunka, have you tried updating wordpress?

    Apologies for the triple post but I was a little quick on the trigger there. Updating did not solve the issue. 1 minute after enabling wordpress, while still blocking all traffic my server load multiplies by 5.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘database error when too much traffic’ is closed to new replies.