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 wait_timeout stop working

Discussion in 'General Discussion' started by Dmitry M., May 2, 2006.

  1. Dmitry M.

    Dmitry M. Active Member

    Joined:
    Dec 4, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Hello!!

    I have a problem with mysql on one of our servers. Here is my my.cnf

    [mysqld]
    safe-show-database

    set-variable = wait_timeout=30
    set-variable = interactive_timeout=30
    set-variable = connect_timeout=15
    set-variable = max_user_connections=25
    set-variable = max_connections=999

    .......

    During some time this config is working fine, then this variable
    set-variable = wait_timeout=30
    stop be accepted by mysql server. I meant this variable isn't changed, but mysql stop killing connections that exceeded this limit. As result we have 999 connections in 3-4 hours and our tech should restart the mysql server.

    Any thoughts?
    Thanks for reading.
     
  2. phuner

    phuner Member

    Joined:
    Feb 8, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem... any news, anyone?
     
  3. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    This is also affecting one of my servers:

    mysql Ver 14.7 Distrib 4.1.19, for pc-linux-gnu (i686) using readline 4.3

    cg
     
  4. Dmitry M.

    Dmitry M. Active Member

    Joined:
    Dec 4, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Hi guys!
    I posted the start post here.
    We have fixed this by upgarding our mysql to 4.1.19. I think it isn't fix for you but I think it is a problem with mysql engine (bad instalation or corupt file(s)). Because upgarde fixed this problem perfectly.
    Try to just re-install mysql or upgarde it to 4.1.20

    Note: we had this problem with 4.0.x only.
     
  5. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Thanks for your reply.

    Our problem was due to so many scripts using mysql_pconnect + a faulty kernel from CentOS (2.6.9-34.0.2.ELsmp) causing the server to swap too much.

    cg
     
  6. Dmitry M.

    Dmitry M. Active Member

    Joined:
    Dec 4, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    I think wait_timeout should disconnect pconnect connections. We use this option specially to do it.
     
  7. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    If this is the case then we still have a problem... can anyone confirm?

    cg
     
  8. cinusik

    cinusik Active Member

    Joined:
    Jul 31, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    closet geek, I can confirm that wait_timeout is not working anymore after I upgraded my 4 servers from mysql 4.0.27 to mysql 4.1.20
    I'll try to downgrade to 4.1.19 and I'll let you know if it helps.
     
    #8 cinusik, Aug 11, 2006
    Last edited: Aug 11, 2006
  9. closet geek

    closet geek Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    I appreciate that!

    cg
     
  10. cinusik

    cinusik Active Member

    Joined:
    Jul 31, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Downgrading to 4.1.19 did not helped. I wonder if anybody else has the same issues as we have. For more info, I also updated apache and php on my two servers from 4.4.2 to 4.4.3 and on other two I just recompiled php 5.1.4 after mysql upgrade from 4.0.x to 4.1.x so it is maybe related somekind to php, I have no clue.
    Temporary fix for thisone is to disable persistent mysql connections in php.ini
    mysql.allow_persistent = Off
    Any help is appreciated.

    [EDIT]
    Above fix helped a lot but there are still hanging connections above my time_wait = 60 limit:

    +-------+---------------+-----------+-------------------+---------+------+----------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +-------+---------------+-----------+-------------------+---------+------+----------------------+
    | 1499 | eximstats | localhost | eximstats | Sleep | 33 | | |
    | 33177 | sobal_cdrlab | localhost | sobal_cdrlab | Sleep | 841 | |
     
    #10 cinusik, Aug 11, 2006
    Last edited: Aug 11, 2006
Loading...

Share This Page