zoukankan      html  css  js  c++  java
  • MariaDB链接超时优化

    查看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个小时

  • 相关阅读:
    Java 连接 Memcached 服务
    Memcached命令-存储命令-查找命令-清理命令
    memcache安装
    Python爬虫模拟登录带验证码网站
    HashMap原理
    redis 在java中的使用
    redis 事务
    Redis命令续
    Redis命令
    ApplicationListener用法
  • 原文地址:https://www.cnblogs.com/sysk/p/5545106.html
Copyright © 2011-2022 走看看