You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Sven Haiges <sh...@flavor.de> on 2003/10/06 20:18:37 UTC
Problem with loosing connections after a while
Hi there,
I integrated Torque with a struts-based web application and everything
works fine, except:
after a few hours, it seems like Torque (Commons Connection Pool) is
loosing the connectivity to the MySQL database... this then results in some
errors, of course.
How can one keep the connections alive? Is there a special trick / setting
that tells torque to refresh the connections after a while?
Here is my Torque.properites section that should be relevant:
#torque.dsfactory.xmas.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.xmas.factory=org.apache.torque.dsfactory.PerUserPoolDataSourceFactory
(what is the difference, actually??)
# Lifetime of a connection in the pool. Defaults to one hour
#torque.defaults.pool.maxExpiryTime = 3600
-> as you can see, i did not change this setting. Is one hour too much
here? Does anyone have experience with MySQL connections, using the Commons
Pool? What value is best here and does prevent the errors?
cu
SVEN