• littlestbookshelf

    (@littlestbookshelf)


    I was in my WordPress admin page and received this error message when I refreshed my browser.

    Warning: mysql_connect(): Too many connections in /home4/brada/public_html/wp-includes/wp-db.php on line 1515

    Error establishing a database connection

    I can get into the Dashboard again but I don’t know how to prevent this error from happening again. I’m worried I’ll be kicked out again at any time and be unable to have access to the what I need to correct.

    Any help would be greatly appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • catacaustic

    (@catacaustic)

    That’s your web server restricting the connections to your MySQL server. Note that that’s not always just from your site. When you’re on a shared hosting server, the connection limits are normally pooled between all users, so it can be easy to run out.

    How to fix it is not something that you can do. You will need to talk to your hosting company and alert them to the fact that this is happening. They might, or might not, do something about it, but that’s the only way to “fix” this issue.

    guillermovargasquisoboni

    (@guillermovargasquisoboni)

    I want to report exactly the same error for me !!!

    I want to add that this is the first time in almost three years with the same hosting company that this happened to me. A simple coincidence ? Maybe yes or maybe not…

    Are you also hosted by ovh? Do you also installed today the last wordpress version (4.5?)…

    Maybe something really grave is happening. Calling for help !

    Thread Starter littlestbookshelf

    (@littlestbookshelf)

    I’m using Hostgator for my hosting. I haven’t had the issue before. I’m just hoping it doesn’t happen again. It’s very scary.

    magicke

    (@magicke)

    Working on a wp site for a client. Same error. Hostgator support saying ‘the wp site is consuming too many resources” and that “your theme may be misbehaving”. Hosting plan is shared.

    The site never used to give this error and the problem started cropping up mid- to late-march. I’m guessing it’s something Hostgator implemented, but they’re insisting it’s the website’s fault. >.<

    Go /wp-includes/wp-db.php on line 1515 just help now for hide warning.

    Find Replace with:
    $this->dbh = mysql_connect
    
    $this->dbh = @mysql_connect

    Do NOT do what Ravi mentions! It just suppresses the error and doesn’t fix the problem which is really causing your server to crash again and again. If you look at Ravi’s website, it doesn’t even load up – and comes up with a database error – no wonder!

    • This reply was modified 7 years, 3 months ago by mkormendy.
    • This reply was modified 7 years, 3 months ago by mkormendy.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘mysql_connect() Error’ is closed to new replies.