Hallo!
Folgende Meldung finde ich im Log eines Tomcats wenn ich längere Zeit nicht mit dem Reportserver arbeite:
Ausschnitt:
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 65,912,739 milliseconds ago. The last packet sent successfully to the server was 65,912,740 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.
at sun.reflect.GeneratedConstructorAccessor328.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3853)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2471)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2671)
at com.mysql.jdbc.ConnectionImpl.setTransactionIsolation(ConnectionImpl.java:5309)
at com.mchange.v2.c3p0.impl.NewProxyConnection.setTransactionIsolation(NewProxyConnection.java:710)
at net.datenwerke.dbpool.DbC3p0PoolServiceImpl.configureConnection(DbC3p0PoolServiceImpl.java:226)
at net.datenwerke.dbpool.DbC3p0PoolServiceImpl$1.get(DbC3p0PoolServiceImpl.java:144)
… 79 more
Caused by: java.net.SocketException: Connection timed out
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3834)
… 86 more
Ich habe schon im Internet recherchiert, und bin dabei auf einen Ansatz gestoßen dem Parameter ?autoReconnect= true an den jdbc-URL anzuhängen. Jedoch scheint dies im Zusammenhang mit c3p0 nicht zu funktionieren.
Gibt es dafür vl. eine Lösung um dieses Connection Problem zu lösen? Prinzipiell wäre es nicht so schlimm, jedoch bereitet es mir Probleme, wenn eine Einplanung in der Nacht durchgeführt werden sollte, aber aufgrund des gezeigten Problems abgebrochen wird.
Ich denke mal es ist sicher möglich die Timeout-Zeit zu erhöhen, jedoch kann es in meinem Fall schon vorkommen, dass Reports nur im Abstand von 1 Woche automatisch generiert werden (durch Einplanungen)…
Für jede Hilfe wäre ich sehr dankbar!
Lg, Hans Peter