zoukankan      html  css  js  c++  java
  • interactive_timeout wait_timeout

    官方解释:
        interactive_timeout
               The number of seconds the server waits for activity on an interactive                               connection before closing it.
              等待一个交互进程变成活动状态的最长时间
         wait_timeout
               The number of seconds the server waits for activity on a noninteractive                           connection before closing it. This timeout applies only
               to TCP/IP and Unix socket file connections, not to connections made using                  named pipes, or shared memory.
                等待一个未交互进程变成活动状态的最长时间
    首先理解交互进程,它指的是这个进程正在等待该进程的提交、撤销操作;未交互进程指的是该进程的一个操作已经完成,正在sleep,等待下个操作进行。
    实际操作看看这两个参数的效果:
    SET GLOBAL interactive_timeout=20;
    SET GLOBAL wait_timeout=50;

     s1 s2
    start transaction
     update t set c1 = 1;
     等待20s不提交
     发现直接被断开

     update t set c1 = 1

     等待50s

     被直接断开



    PS: wait_timeout  设置为大于数据池执行心跳探雷的时间


  • 相关阅读:
    数据库的安装
    数据库大整合
    数据库的设置及其初始密码
    HTML标签
    增加删除的js
    增删改查js
    表单验证码限制条件
    倒序输出插入的数组
    插入数组排序法1
    求下标长度
  • 原文地址:https://www.cnblogs.com/signheart/p/6595403.html
Copyright © 2011-2022 走看看