too many database connections

Discussion in 'Site & Server Administration' started by sp360, Apr 19, 2008.

  1. #1
    i have a dedicated host with SoftLayer at the moment and i got a database of around 1000+ content on it, and all the script does is extract codes like "gf98gj498j3" and the server keeps crashing and phpMyadmin says too many database connections. Does any one know how to solve this problem or what to upgrade on my server in order to prevent this from happening.
    Thanks, SP360
     
    sp360, Apr 19, 2008 IP
  2. SSANZ

    SSANZ Peon

    Messages:
    861
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depends on how much resources MySQL is using, you may be able to reconfigure MySQL to handle the extra load.

    However, as i said above it depends on your MySQL resource usage - you may need another server for mysql.
     
    SSANZ, Apr 20, 2008 IP
  3. gate2vn

    gate2vn Peon

    Messages:
    809
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Have you checked /etc/my.cnf? How many connections do you allow?
     
    gate2vn, Apr 20, 2008 IP
  4. tsenseless

    tsenseless Active Member

    Messages:
    368
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Too many connections is due to max connections set in your mysql config file..

    Edit the file /etc/my.cnf

    set the "max_connections" variable to a higher number if it is present. If it is not present copy and paste "max_connections = 1024" under where it says [mysqld] (should be the first line) in the config file.
     
    tsenseless, Apr 23, 2008 IP
  5. rootbinbash

    rootbinbash Peon

    Messages:
    2,198
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    0
    #5
    All above is correct, BUT for a clean solution i have to see the script, you will need more ram for sure instead of changing max_connections.ANd also i do not recommend upgrading mysql if you dont know well
     
    rootbinbash, Apr 24, 2008 IP