« Return to Thread: Database connection problems after 8 hours

RE: Database connection problems after 8 hours

by AleCaste :: Rate this Message:

Reply to Author | View in Thread

I found workaround for this.

Through the Quartz plugin, I created a periodic job that writes, reads, and delete a temporal GORM object using hibernate in order to keep the connection alive.

The problem is hibernate-related because when I use the database directly I get no errors whatsoever even after 2 o 3 days running.

With a tiny periodic job like the abovementioned one, the problem does not longer occur. I don't like it too much because it is a workaround and not a fix, but for now I can make do with it.

My scenario is Grails+MySQL+GlassFish, and I'm using the database both directly and through hibernate (not using JNDI by the way). I have no idea whether this problem arises in other scenarios too although there are quite a lot of people reporting broken-pipe connection issues out there.

Once again, I'm certain it has to do with HIBERNATE (I'm using Hibernate 1.1.1 plugin for Grails).

If anyone finds out how to really fix this, please let me know.

Thanks everyone




I use the sun app server 2.1 with several Grails apps without any
problem.  I know it is glassfish based, not sure how different it is
from straight glassfish.  Are you connecting directly or jndi?

 « Return to Thread: Database connection problems after 8 hours