The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql flood everynight

Discussion in 'General Discussion' started by dmtnet, Jun 24, 2004.

  1. dmtnet

    dmtnet Active Member

    Joined:
    Feb 1, 2003
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Everynight I have my mysql pretty much just crash on me, and its because of the cron jobs running at midnight, or atleast thats my educated guess because when I disabled crond for a half hour it was good to go. But all the cron jobs and cron log are normal everyday things. So any ideas of why its crashing like it is. Below is the my.cnf

    Also the message after about 5 mins of not responding is Too Many Connections


    Any ideas would be greatly appreciated.
     
    #1 dmtnet, Jun 24, 2004
    Last edited: Jun 24, 2004
  2. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Your max connections are set to 1000.

    set-variable = max_connections=1000

    If you get too many connections that means all the above connections are already used up. Incase the number and the problem will dissapear.
     
  3. hellfish

    hellfish Member

    Joined:
    Jun 25, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I make use of this oportunity to ask how can one force that event so one could test error trapping on his conection to mysql?
     
  4. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    It would depend on how you code in your php or perl coding.

    You can use something like this:

    $con=mysql_connect($localhost,$databaseuser,$databasepassword) or die("Connect Error: ".mysql_error());
     
  5. dmtnet

    dmtnet Active Member

    Joined:
    Feb 1, 2003
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I've tried increasing the max connections to 3000, and the timeouts at 2-5secs and 8 threads. Nodda
     
  6. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Well the error you said happens only when all available connections to mysql are full. Try to monitor the connections at the time when this error appears, this way you could get an idea on what may be causing this.
     
Loading...

Share This Page