tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Vávra <>
Subject Re: Tomcat recycling
Date Mon, 21 Nov 2011 13:29:16 GMT
> Hash: SHA1
> Jan,
> On 11/18/11 10:35 AM, Jan Vávra wrote:
>> is there any way how to tell tomcat: Recycle after X minutes OR Y
>> requests like it is eg. on the IIS server?
> Tomcat does not come with any mechanism for doing that. IIS has hacks to
> work-around horrible programming; Tomcat has some workarounds
> (ThreadLocal purging, etc.) but generally not.

As I wrote I think I'd would be a good enhancement of Tomcat.
>> If I add my own script containing "/etc/init.d/tomcat restart"  to
>> the crontab I loose the user sessions and users have to relogin.
> Then you need to fix your app. Unless you have changed the default,
> Tomcat will persist sessions across restarts. This doesn't work if your
> webapp puts non-serilizable objects into the session. Remember, just
> marking a class as "implements Serializable" might not be enough.

Thanks for a good hint. It works.

>> I experience some problems with OutOfMemory error.
> Fix your webapp.
>> On tomcat I run a periodic thread that downloads CRLs and I
>> suspect this of memory leaks.
> Certificate Revocation Lists? What do you do with them?
> Why just guess at the cause of your memory leak when you can fairly
> easily look at the objects that are taking up lots of room? Get a memory
> profiler and take a look.

If you want to validate a certificate that is outdated but comes with a 
timestamp, you need to have a historical crl to judge whether the cert 
was or wasn't revoked during it's validity period. Some authorities are 
deleting outdated certs from their crl.


>> I consider to cut out this to a standalone process called via
>> crontab.
> That would be my preference. I believe timer threads have no business
> running inside a servlet container, but there are many who disagree
> with me.
> - -chris
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools -
> Comment: Using GnuPG with Mozilla -
> 8GEAnArB7wYhJ5KVsAGqT4h9UhzCyee6
> =HKqZ
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message