tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tino Schwarze <>
Subject Re: About possible memory leak in Tomcat 5.x
Date Tue, 20 Dec 2005 11:47:37 GMT
On Tue, Dec 20, 2005 at 12:39:50PM +0300, Andrievsky Dmitry wrote:

> P.P.S What seems to me interesting.  Although before putting
> PageContextImpl into pool JspFactoryImpl calls pc.release(), and
> inside the method all links must become null (or not?..) and
> referenced objects must become available to gc, they are not.  May be
> it is the root of the problem?..

I came across this too and it was caused by Servlets calling
JspFactory.getPageContext(...) and _not_ releasing the PageContext by
calling JspFactory.releasePageContext(...) - which is a real memory
leak (not caused by Tomcat but by the application!). Actually, the
BodyContent array inside PageContextImpl is not reset so the
BodyContents get reused - this might cost significant amounts of memory,
depending on the application.

We have been discussing this recently and it looks like there will be
solution which is useful for everyone: USE_POLL will be made
configurable and maybe big BodyContents will be reset on release().

Bye, Tino.

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

View raw message