Skip to main content

Mysql wait_time out

Comments

4 comments

  • sahostking
    I've set it to 60 seconds: MariaDB [(none)]> SHOW VARIABLES LIKE 'wait_timeout'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | wait_timeout | 60 | +---------------+-------+ but I still see this after reloading mysql: Id | User | Host | db | Command | Time | State | Info | Progress | +------+---------------+-----------+--------------------+---------+------+-------+------------------+----------+ | 2 | dbname_wp | localhost | dbname_wordpress | Sleep | 84 | | | 0.000 Shouldn't they be killed at 60 seconds ?
    0
  • 24x7ss
    Hello, Did you set the variable "interactive_timeout" as well ? This also affects connections. But I will suggest you to use mysql_close function in your scripts instead of lowering the timeout. Lowering this value to 60 could cause issues to busy websites.
    0
  • sahostking
    It's a shared hosting server. What do you recommend. We had all ours on the default of 28800 so we want to fix this and set it properly but not affect our customer sites. What do your recommend. I noticed some put theirs even at 20s. But we'd rather not go that route. 60 or 120? o r higher?
    0
  • cPanelMichael
    Hello :) Have you considered running a MySQL tuner and seeing if it suggests changing the wait_timeout value? Thank you.
    0

Please sign in to leave a comment.