tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49159] Improve ThreadLocal memory leak clean-up
Date Tue, 28 Sep 2010 21:34:54 GMT

--- Comment #10 from 2010-09-28 17:34:48 EDT ---
Created an attachment (id=26097)
 --> (
Patch for tomcat 7 to renew threads one by one with a delay without requiring a
fair queue

I worked a little more on my patch to avoid requiring a fair queue. I actually
reused part of my very first patch (the Listener). Basically here is what is
done :

- idle threads are stopped all at once, even core pool threads. This is done by
- like my previous patch, active threads are stopped one by one with a delay.

All in all, this avoids performance impacts under load since only idle threads
will be stopped as a whole, and other threads will be renewed slowly.

This memory leak protection is not 100% deterministic since one could think of
scenarios where the load decreases just after a leaking context is stopped, so
that some (core pool) threads are no longer used but still present in the pool
and thus triggering the memory leak...
But it's a compromise between performance impacts and the duration of the
memory leak.

I'd be glad to have some feedback on this patch!

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

View raw message