com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet success
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 60,547,352 milliseconds ago. The last packet sent successfully to the server was 60,547,352 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
日志文件从这个地方开始往下只要是数据库操作就开始报错:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
还有这个错:
No operations allowed after connection closed.
再往下就是:
java.sql.SQLException: Operation not allowed after ResultSet closed
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ResultSetImpl.checkClosed(ResultSetImpl.java:803)
at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:6985)
at com.dz.servlet.LoginServlet.service(LoginServlet.java:54)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:845)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:688)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1315)
at java.lang.Thread.run(Unknown Source)
数据库版本:mysql 5.1.50
服务器版本:tomcat5.5
上面所有的错误重启tomcat后就没有了,但是,总不能让我每天都跑来重启服务器吧,所以这个问题还得解决,要想解决这个问题就得靠坛子里的大佬们了!!各位高手!请指点一下!!
相关推荐
解决Cause com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
Cause com.mysql.jdbc.exceptions.jdbc4.CommunicationsException The last packet successfully received from the server was 47,795,922 milliseconds ago. The last packet sent successfully to the server was 47,795,922
【问题排查】MySQL 连接异常:com.mysql.cj.jdbc.exceptions.CommunicationsException_ The last packet successfully
分析 MySQL 连接超时异常,并提供多种解决方案。
Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: ….. this is incompatible with sq
1、写在开头 标题之前我想说一下Linux的mysql真的实在是太坑了。太坑了。总是会出现这样那样的你想不到的问题。崩溃了。首先来罗列一下我遇到过的一些问题吧。 1、大小写敏感 2、连接数超过系统最大连接数 3、Can’t connect to local MySQL server through socket ‘/Data/mydata/mysql.sock’ socket文件目录不对应导致的问题 4、今天要说的就是 没有打开only_full_group_by Cause:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExcepti
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (11087 > 102
博文链接:https://zyx19920203.iteye.com/blog/2301226
Spring Boot 配置MySQL数据库重连的操作方法
主要介绍了Spring Boot 配置MySQL数据库重连的操作方法,需要的朋友可以参考下


Web 开发
