在项目中报错:The last packet successfully received from the server was 81843482 milliSeconds,the last packer send successfully to the server wes 81843482 milliseconds ago,is longer than the server configured values of "wait_timeout".......
配置文件中配置的有:spring.datasource.maxIdleTime=1800数据库里面的timeOut_time 是28800,理论上不是应该不会出现这种情况么?
数据库连接上配置的还有autoReconnect=trrue,很是困惑,跪求各位大神能指明可能问题原因

解决方案 »

  1.   

    你的 wait_timeout 是 28800 sec?81843482 ms 是超过 了啊
      

  2.   

    maxIdleTime是jdk的threadpoolexecutor的keepalivetime,keepalivetime是指当前线程总数超过corePoolSize,会将空闲时间超过maxIdleTIme的thread杀死知道线程总数为corePoolSize。你没看到线程回收,应该是线程总数没有达到corePoolSize。只有线程数达到corePoolSize,并且taskQueue队列满了才会添加worker线程。https://m.aliyun.com/yunqi/ask/18064/