can't connect to server too many connections error ?

Discussion in 'MySQL' started by thsadmin, Sep 15, 2008.

  1. #1
    hey Guys,

    I keep getting this error :

    "can't connect to server too many (my)sql connections"

    How do I fix this ? I have looked in config.php and .ini etc and I can't find where to adjust the number of connections ....

    It's a drupal CMS script that keeps getting the error and I am on a dedicated server with Hostgator.

    if you need more details i can supply them.

    Thanks,
    Jason
     
    thsadmin, Sep 15, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    mwasif, Sep 15, 2008 IP
  3. thsadmin

    thsadmin Notable Member

    Messages:
    4,889
    Likes Received:
    133
    Best Answers:
    1
    Trophy Points:
    240
    Digital Goods:
    2
    #3
    OK thanks for that, to stop it all I have done is turn off my RSS aggregater and in turn turn off the auto ping service, because I was grabbing 100 plus feeds an hour and then pinging the 4 main services, I guess right there is an issue ....

    Thanks,
    Jason
     
    thsadmin, Sep 15, 2008 IP
  4. madzzkill

    madzzkill Active Member

    Messages:
    282
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    78
    #4
    Thank you very much mwasif,

    We have the same error tshadmin.
     
    madzzkill, Sep 15, 2008 IP
  5. Stellarchase

    Stellarchase Guest

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Also be sure that you're using mysql_close(); at the end of your documents. This will make sure there aren't too many connections open at once :)
     
    Stellarchase, Sep 16, 2008 IP
  6. OutBackPro3

    OutBackPro3 Peon

    Messages:
    95
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yes, these are all good suggestions. You may also want to run "top" from your ssh client and watch your available RAM. believe it or not, but if you don't have enough RAM available, swapdisk tends to cause bigs problems, high load averages, mysql connection problems, etc. I had this problem also a few years back. I doubled the Ram and now the server is still asking for more.. you can never have too much ram on your machine - just check your usage and see what yours looks like
     
    OutBackPro3, Sep 16, 2008 IP