tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Memory Leak(?) causing tomcat to store 57610801 tomcat objects in ONE request
Date Thu, 15 Jan 2009 15:40:10 GMT
Hash: SHA1


Leon Rosenberg wrote:
> The last thing I can imagine is that the request somehow gets
> redirected or forwarded infinitely during processing, but is not
> leaving tomcat entirely and just reenters the processing, keeping the
> outer request object, where the mimeheader fields are stored. Is
> something like this possible?

Unlikely. Here's why:

1. A redirect would end the request, freeing all these objects.
   You'd probably also notice that many requests were being made.
   Also, most browsers give up after a certain number of redirects
   in a row.

2. Internal forwards (achieved by calling RequestDispatcher.forward)
   result in a deeper call stack. Thus, infinite forwards would likely
   result in a StackOverflowError.

My guess is that you have an infinite loop that might not look like a
loop (maybe the loop body is several screens long or whatever). What do
thread dumps look like for this thread? Presumably, this request has a
thread stuck to it which is actually executing code.

Chuck's suggestion to modify MimeHeaders.createHeader is a good one,
though hacking and recompiling Tomcat isn't my idea of a fun time.
Instead, I'd write a filter that wraps the response with a
HttpServletResponseWrapper whose setHeader/addHeader methods have been
overridden to spit out a timestamp and maybe even a stack trace. I think
you'll be able to find out some good information from that.

Good luck,
- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message