The lastpacketsentsuccessfully to the server was 0millisecondsago. The driver has not received any packets from the server.### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Fa
出现异常”The lastpacketsentsuccessfully to the server was 0millisecondsago.“的大部分原因是由于数据库回收了连接,而系统的缓冲池不知道,继续使用被回收的连接所致的。 以mysql为例: 第一种解决办法,就是将mysql回收空闲连接的时间变长,mysql默认回收时...
项目启动后,就报 The lastpacketsentsuccessfully to the server was 0milliseconds。完整的错误就不贴了,大概意思就是连接数据库失败,上次成功发送到服务器的数据包是0毫秒前。驱动程序没有收到来自服务器的任何数据包。看到这个错误的时候有点懵逼,其他连接这个数据库的应用又没问题,怎么就忽然不行了?这个错误,这2天碰到2次了,第一次更神奇