MySql Proccesslist filled with “Sleep” Entries leading to “Too many Connections”?

后端 未结 6 1421
礼貌的吻别
礼貌的吻别 2020-12-12 12:41

I\'d like to ask your help on a longstanding issue with php/mysql connections.

Every time I execute a \"SHOW PROCESSLIST\" command it shows me about 400 idle (Status

6条回答
  •  不思量自难忘°
    2020-12-12 13:17

    The above solutions like run a query

    SET session wait_timeout=600;
    

    Will only work until mysql is restarted. For a persistant solution, edit mysql.conf and add after [mysqld]:

    wait_timeout=300
    interactive_timeout = 300
    

    Where 300 is the number of seconds you want.

提交回复
热议问题