mysqld/apache/WP - Lost connection to MySQL server during query

Discussion in 'Site & Server Administration' started by peoplesmind, May 19, 2010.

  1. #1
    Hi guys,

    I have a 256mb RAM / 10GB space box in the rackspace cloud, set up from scratch with CentOS 5.2/LAMP (for wordpress), and a mysqld on the same machine. The only site on this machine gets ~100 unique visitors per day doing about ~300-400 page views.

    Every once in a while (once or twice a day), the mysqld will crash and I can't seem to figure out the problem.

    Taking a look at the error log, here's what I find:

    And it continues with the 'MySQL server has gone away for query' errors until the server is rebooted. Each time this happens, an error of Lost connection shows up, then followed by the downtime of the server. Nothing that gets logged in mysqld.log file.

    Each time it's a different query that causes the crash, and the latest crash (above) seems to have been started by an extremely simple query ("SELECT term_id FROM wp_terms WHERE name='Uncategorized'") which returns 1 row and otherwise executes in 0.00 seconds from the command line.

    Could anyone tell me what's causing this issue, how to find out what's causing this issue, or what steps I need to take to fix this?

    Thanks a LOT!
     
    Last edited: May 19, 2010
    peoplesmind, May 19, 2010 IP
  2. CLDPFY

    CLDPFY Peon

    Messages:
    76
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is there anything in the mysql error log versus the apache error log? Are you using one of the stock configurations for mysql? If so, which one, if not, what is in your mysql configuration file? What version of MySQL are you using?

    The mysql has gone away errors are exactly what they seem, the server crashes and the connections are dropped. Something is causing it to crash. If you are lucky there will be clues in the mysql error log and potentially even a stack trace that you can use to get to the root of the problem.
     
    CLDPFY, May 20, 2010 IP
  3. crashus

    crashus Active Member

    Messages:
    90
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Tweak your my.cnf and check mysql logs
     
    crashus, May 22, 2010 IP