• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

socket write error

 
Tudor Raneti
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i leave my app idle for a long time, it eventually goes java.net.SocketException: Software caused connection abort: socket write error
when i come back to it and it tries to do: query.list()
The db server is MySQL5. The ORM framework is Hibernate.

The question is, can i restart the connection within a try catch block somehow? I mention if i just restart the Tomcat server, the problem is gone of course.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you using for connection pooling?
 
Tudor Raneti
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Internal i suppose. Will check c3p0 out and post back if it got fixed. Thank you.
EDIT: i also use a session per request pattern.

Answer: this should be the closest answer related to this particular problem:
http://stackoverflow.com/questions/730827/hibernate-c3p0-mysql-broken-pipe

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic