Are you using pooling?  If so, be sure to have a validation query, in which
case timed-out connections will be recycled before handed to your program.


i.e.:

  <Resource
    name="nameOfDataSource"
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://mysqlserver.mycompany.com:3306/"
    username="root"
    password="mysql"


    validationQuery="SELECT 1"


    initialSize="5"
    defaultCatalog="production"
    maxIdle="25"
    maxWait="5000"
    maxActive="50"/> 




Tim
 

-----Original Message-----
From: David Kerber [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 28, 2006 4:19 PM
To: Tomcat Users List
Subject: Re: can't access database after timcat idle for several hours

Sounds to me like your database is timing out the connection.  See if you
can extend the timeout so it won't drop it during an overnight lull.


james edwards wrote:

> No, different machines. But, it works all day and works right after a
> restart of tomcat.
>
> j
>
> On 4/28/06, ALEX HYDE <[EMAIL PROTECTED]> wrote:
>
>>
>> Are they on the same machine? If not it could be a
>> firewall issue? It could be alot of things but that's
>> a start.
>>
>> --- james edwards <[EMAIL PROTECTED]>
>> wrote:
>>
>> > I am running 3 servers; Apache, Tomcat (5.5.16, java
>> > version "1.5.0_06",
>> > Informix JDBC-1.3.00.JC3) and Informix (7.31.UD2).
>> > After the app has been idle for several hours tomcat
>> > cannot access the
>> > database. Netstat shows not connections to the
>> > database
>> > and tcpdump shows no traffic at all going the
>> > database when queries are made
>> > to the app (which would cause the database to be
>> > consulted)
>> > At first it seemed that the overnight backup of the
>> > database was causing
>> > this problem but restarting tomcat after the backup
>> > only fixes this problem
>> > for a few more hours.
>> > I wrote a loop to wget url's that cause the database
>> > to be consulted every
>> > 60 sec but after several hours this problem happens
>> > again. Tomcat seems to
>> > be fine, I can load the
>> > management page and restart the app. Only restarting
>> > tomcat fixes this
>> > problem, reloading the app does not fix the
>> > problem.. Nothing is being
>> > logged during and right before this problem.
>> >
>> > Does anyone have suggestions to further debug this
>> > problem ?
>



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



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

Reply via email to