MySQL的wait_timeout_MySQL
wait_timeout过大有弊端,其体现就是MySQL里大量的SLEEP进程无法及时释放,拖累系统性能,不过也不能把这个指设置的过小,否则你可能会遭遇到“MySQL has gone away”之类的问题
mysql> set global wait_timeout=20;
mysql> show global variables like 'wait_timeout';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| wait_timeout |20 |
+----------------------------+-------+
今天发现很多sleep的进程,mysql给出的原因为3个:
1 The client program did not call mysql_close() before exiting.
2 The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server.
3 The client program ended abruptly in the middle of a data transfer
上一篇: PHP中字符安全过滤函数使用小结,php字符函数小结
下一篇: html制作细线表格的简单实例