tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Àíäðèåâñêèé Äìèòðèé <dim...@teztour.com>
Subject application memory leak
Date Fri, 26 Aug 2005 07:07:06 GMT
Hello,

May be it's some kind of stupid question, but where in tomcat
environment may be memory leak?
I can imagine three subjects:
- objects stored in application scope
- objects stored in session scope
- objects handled by static properties
Is there any other place where objects can be referenced from
and not to be gc'ed?

My situation:
Application "eats" about 40 kb on each request.
More precisely - about 200m on 5000 requests, as i have measured.
At start of an application I have about 100m of heap occupied.
After the next gc it's about 105, and so on - after about 5000
requests it's about 300 mb occupied.

I've examined all objects that are stored in application scope - so
their size do not change with growth of "eaten" memory.
Session can be relatively large, but there are about 150 sessions all
the time (their number does not grow uncontrollable).
By the way I removed from session any large objects - no change in
memory-leak-behaviour.

I've examined static properties too - there are no properties that can
grow (almost all - int and string constants)

I use tomcat 5.0.25 with all "view pages" in jsp, most controller work
done by struts actions.

In jsp relatively often I use construction
<c:set var="html">...</c:set>
...
${html}
(pregenerate part of the page, use some data it produced
[such as custom title] and only then output html)
May it be memory bottleneck?..

May be it's necessary to avoid some kind of pooling of pageContext's
or String handlers (or even HttpRequest objects?) in Tomcat config?

BTW, is there any other well-known memory-leak issues?


-- 
Best regards,
 Dmitry                            mailto:dimmik@teztour.com


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


Mime
View raw message