You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim Lucia <ti...@yahoo.com> on 2007/07/01 01:00:19 UTC

RE: Trouble with java.util.Timer in Tomcat 5.5

You could as a simple test write a trivial web app, where the
contextInitialized() creates a trivial Timer, where the run() method simply
logs the event, perhaps with an integer count.  Run that alongside your
failing webapp and see if there is any correlation.

Tim


> -----Original Message-----
> From: David kerber [mailto:dckerber@verizon.net]
> Sent: Friday, June 29, 2007 11:00 AM
> To: Tomcat Users List
> Subject: Re: Trouble with java.util.Timer in Tomcat 5.5
> 
> I've considered that, and I can't absolutely rule it out, but I was
> careful writing my code, the code is pretyy simple, and I don't see any
> indication of a memory leak in my system memory usage as time goes by.
> If there is one, it's pretty subtle.  I guess I could start gc logging
> just to be sure...
> 
> Thanks!
> D
> 
> Propes, Barry L wrote:
> > wouldn't be a memory leak issue would it?
> >
> > -----Original Message-----
> > From: David kerber [mailto:dckerber@verizon.net]
> > Sent: Friday, June 29, 2007 9:41 AM
> > To: Tomcat Users List
> > Subject: Trouble with java.util.Timer in Tomcat 5.5
> >
> >
> > I have an app running in Tomcat 5.5.12, with jre  1.5.0_12 (explicitly
> > specified in the service configuration), on windows 2000 server.
> >
> > I have one class that is initialized by a servletContextListener, in the
> > contextInitialized event.  This class uses java.util.Timer and
> > java.util.TimerTask to check every few minutes for new files on an ftp
> > site, and if it finds any, it downloads and processes them.  This all
> > works fine for anywhere from 2 or 3 days to a week or so, then the timer
> > just stops firing, and indicated by a sudden lack of entries in the log
> > file (I log every time the timer fires to help track down this problem).
> >
> > Over the last couple of weeks, I've found some things that can cause
> > this, but I believe I've fixed them, but my timer still stops firing
> > after a few days.  The things I've already fixed were updating the jre
> > to 1.5.12, because of problems with automatic time correction on the
> > server, and I found that unhandled exceptions in the timer task can also
> > cause this, so early last week I modified my code to trap all exceptions
> > before they can trickle up to the timer, and log them, and I don't see
> > any exceptions being logged.
> >
> > It doesn't seem to be related to the number of executions, because the
> > latest time it stopped on me, it had fired around 1200 times, and the
> > time before that was around 4500 times.  It can also be any time of day,
> > and sometimes the server is busy and other times it hasn't had a
> > connection for several hours.
> >
> > Any other suggestions as to what I should look for to find this?
> >
> > Thanks!
> > D
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org