Hoi,

After 8 hours of inactivity, I get de following error, see below.
The manual of MySQL said the following about this error:
5.4.
I have a servlet/application that works fine for a day, and then stops working 
overnight

MySQL closes connections after 8 hours of inactivity. You either need to use a 
connection pool that handles stale connections or use the "autoReconnect" 
parameter (see "Developing Applications with MySQL Connector/J").

Also, you should be catching SQLExceptions in your application and dealing with 
them, rather than propagating them all the way until your application exits, 
this is just good programming practice. MySQL Connector/J will set the SQLState 
(see java.sql.SQLException.getSQLState() in your APIDOCS) to "08S01" when it 
encounters network-connectivity issues during the processing of a query. Your 
application code should then attempt to re-connect to MySQL at this point.

Does anyone had this error. In my case the autoreconnect does not work anymore.

Regards,

Ruud
---

P.S. the error in the tomcat log:
2004-11-13 02:00:53,380 ERROR   mmbase.module.core.MMObjectBuilder - 
org.mmbase.storage.search.SearchQueryException: Query 
'SearchQuery(distinct:false, steps:[Step(tablename:mmservers, alias:null, 
nodes:[])], fields:[StepField(step:mmservers, fieldname:otype, alias:null), 
StepField(step:mmservers, fieldname:state, alias:null), 
StepField(step:mmservers, fieldname:name, alias:null), 
StepField(step:mmservers, fieldname:owner, alias:null), 
StepField(step:mmservers, fieldname:number, alias:null), 
StepField(step:mmservers, fieldname:os, alias:null), StepField(step:mmservers, 
fieldname:jdk, alias:null), StepField(step:mmservers, fieldname:atime, 
alias:null), StepField(step:mmservers, fieldname:host, alias:null)], 
constraint:null, sortorders:[], max:-1, offset:0)' failed: Communication link 
failure: java.io.EOFException, underlying cause: null

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
        at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1394)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1538)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1929)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
        at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2244)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2192)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
        at 
org.mmbase.module.database.MultiStatement.executeQuery(MultiStatement.java:176)
        at 
org.mmbase.storage.search.implementation.database.BasicQueryHandler.getNodes(BasicQueryHandler.java:90)
        at 
org.mmbase.storage.implementation.database.JDBC2NodeWrapper.getNodes(JDBC2NodeWrapper.java:302)
        at 
org.mmbase.module.core.MMObjectBuilder.getRawNodes(MMObjectBuilder.java:1763)
        at 
org.mmbase.module.core.MMObjectBuilder.getNodes(MMObjectBuilder.java:1786)
        at 
org.mmbase.module.core.MMObjectBuilder.searchVector(MMObjectBuilder.java:1417)
        at 
org.mmbase.module.core.MMObjectBuilder.search(MMObjectBuilder.java:1374)
        at org.mmbase.module.builders.MMServers.doCheckUp(MMServers.java:183)
        at org.mmbase.module.builders.MMServers.run(MMServers.java:158)
        at java.lang.Thread.run(Thread.java:534)


** END NESTED EXCEPTION **


2004-11-13 02:00:53,382 ERROR   
storage.implementation.database.DatabaseStorageManager - java.sql.SQLException: 
Communication link failure: java.io.EOFException, underlying cause: null

** BEGIN NESTED EXCEPTION **

<<winmail.dat>>

_______________________________________________
Developers mailing list
[EMAIL PROTECTED]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to