mysql issues on Plesk server - too many connections

Discussion in 'Parallels Plesk Panel 9.x for Linux Problems, Suggested Fixes, and How-To' started by oliviercreacom, Jan 7, 2011.

  1. oliviercreacom

    oliviercreacom New Member

    Messages:
    3
    My config
    Plesk 9.5.4
    OS Linux CentOS 5 32 bits 2.6.33.5-1ikl
    CPU GenuineIntel, Intel(R) Xeon(R)CPU X3430 @ 2.40GHz (4 cores, 2.4 GHz)
    4x2 Go DDR3

    I have had big instability trouble for 4 days now on this server wich is oversized for my use (about 40 domains running, but the top domain has 1500 user/day in the best case...)
    i also have smaller servers and never had these issues.
    My server hangs and i got "too many connection" error, on domains, Plesk...
    I never changed default mysql parameters sofar. These are linux/ Plesk.

    So I did :
    mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` variables
    => wait_timeout 28800

    mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow ` variables | grep 'max.*connections'
    => max_connections 100
    => max_user_connections 0

    mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` extended-status | grep Max_used_connections
    Max_used_connections 91

    BUT
    mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` processlist
    i got 99% of these connections in "sleep" : no request = pas RAM used but connection blocked for users.

    I can add that in my php scripts i think all my mysql REQUEST are closed by mysql_close();

    How can i tweak my.cnf to prevent these problems ?
    raise max_connection ? up to ?
    decrease wait_timeout ? down to ?
    increasse/decrease other values ?

    Thanks for any tips, hints, help :D
  2. oliviercreacom

    oliviercreacom New Member

    Messages:
    3
    A mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` variables gives me
  3. atomicturtle

    atomicturtle Product Expert

    Messages:
    3,764
    check out mysqltuner, you can grab it from the atomic repo (yum install mysqltuner). It will analyse your mysql stats and provide recommendations on tuning your configuration.

Share This Page