Bom dia,
estou enfrentando um problema que a principio parece ser de timeout. Todos os dias pela manhã é necessário reiniciar o tomcat por que a aplicação que roda neste servidor perde a conexão com o banco de dados. Alterei algumas variáveis no mysql:
wait_timeout | 86400
interactive_timeout | 86400
mas não adiantou. Estou utilizando mysql 4.21 e tomcat 5.5.23, o java é 1.6. Utilizo o drive mysql-connector-java-3.1.10-bin.jar , alguem conhece este problema ?
Não poderia estar estourando o pool de conexões, ao invés de ser um timeout?
Tens como postar o erro que te aparece?
Este é um trecho do log do tomcat:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
STACKTRACE:
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2689)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2618)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1551)
at com.mysql.jdbc.ServerPreparedStatement.realClose(ServerPreparedStatement.java:877)
at com.mysql.jdbc.ServerPreparedStatement.close(ServerPreparedStatement.java:453)
at servlets.servletGravaPesquisa.destroy(servletGravaPesquisa.java:274)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1360)
at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1688)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:893)
at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1180)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1151)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at org.apache.catalina.core.StandardService.stop(StandardService.java:510)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)