Randomly having MySQL problems...

Discussion in 'Linux VPS/Dedicated - General' started by Jaxel, Aug 14, 2009.

  1. Jaxel

    Jaxel New Member

    Website has been running fine for a year now... All of a sudden, I'm getting major issues with MySQL. Normally, MySQL only consumes 20% of the resources for my website. Now whenever I check WHM (which takes forever to load), its always in the 30%+ area, and sometimes hits 40%. When this happens my website runs extremely slow. Now I also get random MySQL errors throughout the day...

    MySQL Error   : MySQL server has gone away
    Error Number  : 2006
    Request Date  : Friday, August 14th 2009 @ 04:10:50 AM
    Error Date    : Friday, August 14th 2009 @ 04:11:07 AM
    Script        : [URL]http://www.8wayrun.com/search.php?searchid=185844[/URL]
    Referrer      : 
    IP Address    : ............
    Username      : ............
    Classname     : vB_Database
    MySQL Version :
    My httpd services are also starting to consume more resources. My website isn't really getting more popular, so I don't understand why I am not getting the same level of service and performance I was getting 2 or 3 months ago.
  2. Jaxel

    Jaxel New Member

    Also, I have been getting a lot of "Cron Daemon" updating scripts emails...

    I never got those in the past till recently.
  3. Dan

    Dan Moderator

    Hi Jaxel,

    I do not know if your SQL issues were resolved or not but I can think of a couple of possibilities. Was there an SQL update before you started seeing this? Something could have changed there that is causing the problem. Is there possibly an update for VB? I would definitely check on that. It is also possible that simply restarting MySql will fix the problem too, could just be a hiccup :)

    A daily cron daemon email about cPanel updates is normal. Over the years I have seen where something will happen and these emails won't come in but after a week or so they will start back up. Sounds like that is what you saw and now it's back to normal :)
  4. Jaxel

    Jaxel New Member

    Still having issues... I dont know if there was an SQL update, how do I check this? There was not a VB update either... it just started happening. Most of the time, my website loads in under a half a second; but yet I still get these errors. I get a TON of these errors everyday, but so far NONE of my users have reported getting error pages... so it makes me think that these are false positives...

    As for the daily cron daemon email... I didn't get them for an entire YEAR... now I get one everyday... I would rather not get them. Is there a way to turn them off?
  5. Dan

    Dan Moderator


    I am seeing that this error can be caused by a lot of different things. A crashed table, insufficient resources, ports not open in the firewall, etc...

    A couple of things to look at:
    What is your system's memory usage?
    The MySQL error log. You can find this at /var/lib/mysql/<servername>.err Look and see if it indicates problems with anything.

    In regards to the daily email no, to my knowledge there is no way to disable the daily email. Welcome to being a server admin ;)
  6. Jaxel

    Jaxel New Member

    I think this issue may be linked to a low wait_timeout setting. How do I check what my wait_timeout setting is? Looking at phpinfo, I couldn't find the setting for this setting, however, the setting for mysql.connect_timeout is only set to 60.

    How do I check this setting? And how do I change it? Please remember that I dont know ANYTHING about this stuff, I don't know how to edit php.ini, or even how to connect to my VPS through telnet.
  7. rezag

    rezag New Member

    Mysql's my.cnf (at etc/my.cnf I believe) needs to be edited (a line for that probably needs to be added) , and changed in 60 second increments until it looks good and restarting mysql after each change.

    wait_timeout = 90 and then 150 if needed, etc.

    Probably best to ask support if you are comfortable editing or loggin in

Share This Page