首页 > 数据库技术 > 详细

MariaDB链接超时优化

时间:2016-05-31 11:53:16      阅读:206      评论:0      收藏:0      [点我收藏+]
查看mysql server超时时间:

MariaDB [(none)]> use xspeeder;

MariaDB [xspeeder]> show global variables like %timeout%;

+----------------------------+----------+
| Variable_name              | Value    |
+----------------------------+----------+
| connect_timeout            | 10       |
| deadlock_timeout_long      | 50000000 |
| deadlock_timeout_short     | 10000    |
| delayed_insert_timeout     | 300      |
| innodb_lock_wait_timeout   | 50       |
| innodb_rollback_on_timeout | OFF      |
| interactive_timeout        | 28800    |
| lock_wait_timeout          | 31536000 |
| net_read_timeout           | 30       |
| net_write_timeout          | 60       |
| slave_net_timeout          | 3600     |
| thread_pool_idle_timeout   | 60       |
| wait_timeout               | 28800    |
+----------------------------+----------+
设置超时时间,临时生效(以秒为单位): 
 
  msyql> set global wait_timeout=86400;

  msyql> set global interactive_timeout=86400;

修改配置文件/etc/my.cnf.d/server.conf
        在 [mysqld]下添加
            wait_timeout=86400

默认超时时间是28800即8个小时
86400为24个小时

 

MariaDB链接超时优化

原文:http://www.cnblogs.com/sysk/p/5545106.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!