By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,483 Members | 3,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,483 IT Pros & Developers. It's quick & easy.

mysql connection timeout

P: 3
after 8 hrs my MySQL connection with JDBC gets time out. It gives the error

java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


** BEGIN NESTED EXCEPTION **

com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905 )
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2351)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15 71)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2988)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2917)
at com.mysql.jdbc.Statement.executeQuery(Statement.ja va:824)
at com.mvc.ntier.reqdis.events.LoginEventHandler.proc ess(LoginEventHandler.java:49)
at com.mvc.ntier.reqdis.Controller.doPost(Controller. java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)


** END NESTED EXCEPTION **



Last packet sent to the server was 16 ms ago.

STACKTRACE:

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905 )
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2351)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15 71)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2988)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2917)
at com.mysql.jdbc.Statement.executeQuery(Statement.ja va:824)
at com.mvc.ntier.reqdis.events.LoginEventHandler.proc ess(LoginEventHandler.java:49)
at com.mvc.ntier.reqdis.Controller.doPost(Controller. java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)


** END NESTED EXCEPTION **



Last packet sent to the server was 16 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2563)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:15 71)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2988)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2917)
at com.mysql.jdbc.Statement.executeQuery(Statement.ja va:824)
at com.mvc.ntier.reqdis.events.LoginEventHandler.proc ess(LoginEventHandler.java:49)
at com.mvc.ntier.reqdis.Controller.doPost(Controller. java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)


** END NESTED EXCEPTION **
Jun 22 '07 #1
Share this Question
Share on Google+
3 Replies


Atli
Expert 5K+
P: 5,058
Ok, this sounds like a Java error. So I'm gona move this to the Java forums.

Moderator
Jun 23 '07 #2

P: 2
I have exactly the same problem, can annyone help us please ;-)

I found something here:
http://md.webuni.de/?mod=topic&id=13...ion=1&kicked=1

[PHP]jdbc:mysql://gletscher/mentortest?autoReconnect=true

// i'm implemeted it like this:
con = java.sql.DriverManager.getConnection("jdbc:mysql://" + database+"?autoReconnect=true", databaseUser, databasePass);
[/PHP]

maybe this can help us ... but i have to wait 8 houres now.


i will leave a message if it works like this


cu

Grizzlor
Jun 25 '07 #3

P: 2
I have exactly the same problem, can annyone help us please ;-)

I found something here:
http://md.webuni.de/?mod=topic&id=13...ion=1&kicked=1

[PHP]jdbc:mysql://gletscher/mentortest?autoReconnect=true

// i'm implemeted it like this:
con = java.sql.DriverManager.getConnection("jdbc:mysql://" + database+"?autoReconnect=true", databaseUser, databasePass);
[/PHP]

maybe this can help us ... but i have to wait 8 houres now.


i will leave a message if it works like this


cu

Grizzlor
Ok it doesn't work this way ...
Jun 26 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.