I noticed this bug was marked as resolved, so I tried reloading our
webapp running on Resin compiled from SVN. Same problem.
Familiarizing myself a bit further with YourKit and comparing with the
sources, I believe both
be cleared properly.
Although I have not yet found the path to the HttpRequest. I could send
you my YourKit snapshot if that helps in tracking this down.
Scott Ferguson wrote (2008-10-30 16:11):
> On Oct 30, 2008, at 6:39 AM, Mattias Jiderhamn wrote:
>> Although embarrassed to admit it, we have had long standing problems
>> with PermGen memory leaks. We have gotten used to restarting the
>> every time we redeploy, to avoid OutOfMemoryError. Since we would like
>> to make use of - or at least evaluate - some of the new Resin features
>> like WAR versioning, I thought I’d give fixing this another shot.
> I've added this as http://bugs.caucho.com/view.php?id=3031
> That ThreadLocal needs to be cleared in a finally block when the
> request completes. I'll need to check on that.
> -- Scott
>> In com.caucho.server.dispatch.ServletInvocation there is a static
>> ThreadLocal holding references to the current (original) request
>> dispatching?). This means that as long as the executing (and
>> dispatching) thread remains in Resins thread pool, but is not used for
>> another dispatch, a handle to the original
>> com.caucho.server.http.HttpRequest is held. In the request, there is a
>> handle to a com.caucho.server.dispatch.Invocation, which in turn has a
>> handle to - the application classloader! (And there is your PermGen
>> Isn’t the fact that the ThreadLocal is never cleared an obvious memory
>> leak? Or why haven’t this been fixed even though Scott seems to have
>> noticed this (see
>> If the leak actually is in Resin, why isn’t anybody else seeing
>> Are we doing something unusual? (The only thing I could think of was
>> ServletRequest implementations inside the application being
>> however I can't find any such implementations in use)
>> /Mattias Jiderhamn
>> resin-interest mailing list
> resin-interest mailing list
resin-interest mailing list