Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    204

    Question constant mysql connection issues?

    I have been noticing that MySQL disconnects one a periodic basis. Of course I primarily notice through the email notices from my CB forums. But that means people are being directed to the error page. Not something I like to see. Suggestions?

  2. #2
    Member Janak's Avatar
    Join Date
    Jul 2009
    Posts
    71

    Default

    You would get better idea from MySQL logs

    /var/log/myslqd.log

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge WiredTree Joe's Avatar
    Join Date
    Dec 2006
    Location
    Chicago, IL
    Posts
    68

    Default

    Most forum software can report the exact error being given, but you might be hitting your mySQL max connections. Check your /etc/my.cnf for low values on:

    Code:
    max_user_connections=25
    max_connections=300
    Very active forums can use a lot of connection slots under high concurrent usage. Raising those values and restarting mySQL is a good thing to try out. Don't raise them too high as those limits are in place for a reason. Setting them too high can run you out of server resources very quickly. Without knowing the exact error this is no more than a guess at the cause of the issue, but it might point you in the right direction.

  4. #4
    Member MaestriaNick's Avatar
    Join Date
    Aug 2008
    Posts
    137

    Default

    This is most likely due to the script not closing connections to mysql properly or is getting too busy at times. There is a 25 (max_user_connections) concurrent mysql connection limit which is good for around 100 simultaneous visits on well written scripts. If a script is keeping connections open then obviously 25 concurrent connections do not go far and some of your visitors would see an error.

    Maestriatech.com
    If Someone can do it, We can do it better.
    24/7 Linux /Windows Server Support
    5+ years in the industry
    reachus@maestriatech.com

  5. #5
    Member
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    217

    Default

    Install munin and mysql plugin to monitor the mysql server and get stats out of it. Then try to make a decision from the graphs. You can also try tunning-primer.sh to get draft idea about your mysql system variables setting .. hope that helps
    Affordable Linux Server Managament Solution
    http://www.linuxnetworkcare.com/services/cpanel.php
    [ Phone: 647-722-5303 MSN : sutha@linuxnetworkcare.com AIM : xerophytev skype:ksutha5]

  6. #6
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    204

    Default

    Thanks for the info. Outside of those random notices, there has been no degraded performance. I did find in the log that eximstat/smtp was corrupted. I repaired that and I haven't received another notice. I will keep watching. I just wished logwatch would monitor mysql.

    Thanks,
    Frank

Similar Threads & Tags
Similar threads

  1. constant mysql connection issues?
    By fkatzenb in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 04-12-2010, 01:27 PM
  2. Trans-pacific connection issues
    By psipro in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 07-02-2009, 02:38 PM
  3. Constant pure-ftpd new connection 127.0.0.1 messages
    By Metro2 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-29-2007, 03:58 PM
  4. mysql connection / open session issues
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 01-15-2007, 12:04 PM
  5. Mysql process not in list but constant memory eater
    By mohit in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-18-2006, 04:06 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube