tomcat-users mailing list archives

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

Leon,

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklvVLcACgkQ9CaO5/Lv0PBgyQCgvBSezsoZB64/StEtqeRxX+SI
GloAmQFZai+UtfLqTX5mqEZDYJWmqZAk
=ojk9
-----END PGP SIGNATURE-----

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


Mime
View raw message