Write a dbkeep-alive, schedule it to run say every 15 minutes. Works for me.
I use jcrontab.sourceforge.net to schedule this.
I think DBCP also does something like this, you might want to look at their docs as well.


Mindaugas Genutis wrote:

a couple of days ago a post went by talking about MySQL default timeout
being set to 8 hrs for connections... betting this might be your problem...



Thanks for pointing this out. I've read the thread "Tomcat problems every morning". However, no solution was suggested in that thread. One can assume the solution implicitly: increase default MySQL timeout from 8 hours to say 48 hours. However, if my application stays idle for 48 hours during holidays, it will disconnect after that.


Does anyone else have a suggestion on how to improve on this?




Hello,

My JSP application very often after night, in the morning stops
communicating with MySQL database. I get an exception each morning (the
exception body goes below). The application starts to work again after I
restart it from the Tomcat Manager.

Maybe someone else also had this same problem? My server configuration:
Linux Redhat, Tomcat 4.1.24, Java 1.4.1.

My assumptions where the problem might be: the MySQL connections are
"eaten" by another application or they are "eaten" by my application
somewhere inside and never closed. Or maybe during the night when no one
is working with my application it somehow "frozes"? Can anyone give me a
clue how to start debugging these early morning crashes?

Another clue: Connections to the database are made through an SQLManager
which is a class written by another programmer. The class is a singleton.
Could it be that I have to reset it more often?







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to