Error Web System after a while online

Asked

Viewed 67 times

0

I have a web system on a server, I’m using tomcat and the system is working beauty, only that when it stays a while without someone entering the system it stops working. For example I leave work and leave the system running on the server, when I come back the next day and try to enter error.

My doubts are as follows: What might be this problem?

Excerpt from Error log tomcat:

25-Jun-2015 08:10:38.757 WARN [http-nio-8080-exec-49] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions SQL Error: 0, SQLState: 08S01
25-Jun-2015 08:10:38.757 ERROR [http-nio-8080-exec-49] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions 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:2744)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
  • The files of logs of Tom cat doesn’t show you any information ? @Techies

  • I’ll look for that file

  • found and edited the question with the error.

  • http://stackoverflow.com/a/7747693/3861347 @Techies at a glance, I can’t help you much right now.

  • I still don’t quite understand, could it be something related to my connection pool?

  • From what I read, he rejects your connection. when I have time at work I take a look! @Techies

  • All right, I’ll be waiting. Thank you

  • Managed to solve your problem?

  • @Eduardoseixas I could not solve it the way I wanted, I did a "gambiarra" but I would like to solve it the right way

  • Your problem is very General. The log says you have a connection problem Communications link Failure due to underlying Exception. For someone to help you, you would have to have more information, you understand? It could be a network problem, outside of your application. How was your gambit? You tampered with your code and the error disappeared?

  • If you have managed to solve your problem one way or another, post the answer anyway. You can even reply and mark your answer as accepted, because then, as much as your code is not top notch, it can help someone who is desperate for at least one "gambit," which in the emergency we know helps. Then, based on more information, and more understanding of the error, you ask another question with more information, thus facilitating help. Let’s avoid in this way that your question remains unanswered.

Show 6 more comments

1 answer

0


I solved the problem by making a Thread that makes a query 1 in 1 hour in the bank. This way there is always a "connection" with the bank and the connection does not fall. But recently I received a tip from @rray that would add a property in the Hibernate configuration:

<property name="connection.autoReconnect">true</property>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.