70 users online (0 members and 70 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 0
  2. Restoring MySQL Database After Crash    Forum: PHP Forum
    Replies: 5
  3. Replies: 1
  4. IFrame causing problems    Forum: HTML Forum
    Replies: 1
  5. Replies: 5
  1. #1
    drunkenmonk's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2006
    Posts
    2

    mysql processes continually sleep causing server crash

    Hi all,

    We've been running several virtual servers on a single LAMP host that access about 10 databases for some time now without any serious problems.

    In the last week or so a rather alarming series of events is causing the mysql server to lockup with a too many connections error, then fall over completely, on two occasions this has caused db tables to corrupt. To recover site functionality a full server restart is normally required although a mysql flush-hosts sometimes does the trick.

    Nothing has been chaged/added recently so am a bit baffled.

    Looking at the mysql process list when the problem arrises shows hundreds of processes that seem to be locked into the sleep command for no apparent reason. I have been through all of the connection code over all sites and ensured there are no persistant connections made to the server, hence all connections should auto-close at script termination.

    I have edited my.cnf to allow more connections and give the server a bit of breathing room but this is still occuring pretty much daily.

    Can anyone suggest any possible causes/sollutions as I'm out of ideas!

    Any help greatly appreciated.

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: mysql processes continually sleep causing server crash

    Which version of mysql are you using, and on what hardware?
    There appears to be a problem with < 4.2 with Dual Xeon Hyperthreaded setups, for example ...

  3. #3
    drunkenmonk's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2006
    Posts
    2

    Re: mysql processes continually sleep causing server crash

    Many thanks for the reply.
    I have resolved the issue by setting the interactive timeout to 600 seconds this causes the sleeping connections to be dropped eventually.
    Its certainly not a fix but at least its a resolution