The last packet successfully received from the server was 30,516,920 milliseconds ago.
2017-06-22 10:16
405 查看
今天早上发了一笔交易 发现服务器上报错
![](https://oscdn.geek-share.com/Uploads/Images/Content/201911/13/0d8af4e8aec6e0406d4c4af437491e33)
可见这笔交易是9点半左右发出的 入库的时候发现连接已经断掉,第一反应先计算了一下断掉的时间30516920/3600/1000 = 8.4769222222222.
大概就是半夜一点钟断掉的.我又去查了一下上一次启动项目的时间,发现现在的进程已经不是我上一次启动的进程
![](https://oscdn.geek-share.com/Uploads/Images/Content/201911/13/2de648ce9d80137b0089276f8b34ece8)
了,也就是说中间肯定有人启过,于是我去查了一下Jenkins
.果然有人动过.是不是他启的方法不对,比如说脚本执行完毕后没有重启项目(这里先存疑,不排除这个情况)
我重启了一下,项目问题当然就解决了,但是这肯定不是解决问题的办法,因为没办法确定过段时间会不会出现该问题.所以还是要统计一下持续时间 ....去查启动日志 发现启动日志只有今天我启动后的记录了(这里可以调查一下).很明显启动记录的日志被覆盖了.我只能从这次开始计时了.
好了,现在开始找代码中的问题.
![](https://oscdn.geek-share.com/Uploads/Images/Content/201911/13/0a0abaaa2902afa8f8acba4bac5c41c0)
先说一下背景 这个项目是用mybatis .数据源配置是com.mchange.v2.c3p0.ComboPooledDataSource
所以从这两点着手.之前在网上查过解决办法,就是加上autoreconnect=true,然后就发现加了没卵用.过段时间照样断连.
![](https://oscdn.geek-share.com/Uploads/Images/Content/201911/13/0c678b9cf06904966c894f3a057968e2)
看了一下配置的数据源,感觉问题是出在这里,是不是少配了东西.
![](https://oscdn.geek-share.com/Uploads/Images/Content/201911/13/b0412cf16251290f7238b4d764318b12)
参考了一些网上的配置 ,最后的配置如图.问题解决告一段落,如果过段时间还出问题,本文会继续更新,毕竟还有存疑的部分呢.
可见这笔交易是9点半左右发出的 入库的时候发现连接已经断掉,第一反应先计算了一下断掉的时间30516920/3600/1000 = 8.4769222222222.
大概就是半夜一点钟断掉的.我又去查了一下上一次启动项目的时间,发现现在的进程已经不是我上一次启动的进程
了,也就是说中间肯定有人启过,于是我去查了一下Jenkins
.果然有人动过.是不是他启的方法不对,比如说脚本执行完毕后没有重启项目(这里先存疑,不排除这个情况)
我重启了一下,项目问题当然就解决了,但是这肯定不是解决问题的办法,因为没办法确定过段时间会不会出现该问题.所以还是要统计一下持续时间 ....去查启动日志 发现启动日志只有今天我启动后的记录了(这里可以调查一下).很明显启动记录的日志被覆盖了.我只能从这次开始计时了.
好了,现在开始找代码中的问题.
先说一下背景 这个项目是用mybatis .数据源配置是com.mchange.v2.c3p0.ComboPooledDataSource
所以从这两点着手.之前在网上查过解决办法,就是加上autoreconnect=true,然后就发现加了没卵用.过段时间照样断连.
看了一下配置的数据源,感觉问题是出在这里,是不是少配了东西.
参考了一些网上的配置 ,最后的配置如图.问题解决告一段落,如果过段时间还出问题,本文会继续更新,毕竟还有存疑的部分呢.
![](https://oscdn.geek-share.com/Uploads/Images/Content/201707/61c17ed2eb67211a84e137429ac3f7ad.gif)
相关文章推荐
- The last packet successfully received from the server was 2,926,157 milliseconds ago. The last packet sent successfully to the server was 2,926,158 milliseconds ago. is longer than the server configured value of 'wait_timeout'. 解决办法
- mysql超时:The last packet successfully received from the server was 172,848,658 milliseconds ago.
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 152,219,305 milliseconds ago.
- 彻底解决"The last packet successfully received from the server was * milliseconds ago"问题
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
- Spring连接mysql长时间空闲报错:The last packet successfully received from the server was xx millisecond ago...
- The last packet successfully received from the server was XXX seconds ago
- Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- (2)Mysql ----- The last packet successfully received from the server was *** millisecond ago.The
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
- The last packet sent successfully to the server was 0 milliseconds ago.
- 两种解决异常:“The last packet sent successfully to the server was 0 milliseconds ago. ”的办法
- The last packet sent successfully to the server was 0 milliseconds ago.
- The last packet sent successfully to the server was 0 milliseconds ago.
- java mysql The last packet sent successfully to the server was 0 milliseconds ago.
- MYSQL Communications link failure,The last packet successfully received from the server was
- 两种解决异常:“The last packet sent successfully to the server was 0 milliseconds ago. ”的办法
- Communications link failure,The last packet successfully received from the server was *** millisecon