tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Tomcat Wiki] Update of "OutOfMemory" by KonstantinKolinko
Date Wed, 05 Feb 2014 14:26:43 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The "OutOfMemory" page has been changed by KonstantinKolinko:

Add section on HTTP sessions

   1. Trace the GC roots of this object to find out what is holding on to a reference to that
object that shouldn't be. That will be the source of the leak.
+ = HTTP sessions =
+ (In response to [[|[1]]], [[|[2]]])
+ Please remember that a JSP page, even one that simply prints out “OK”, will create a
session.  This is by design and if you do not want it to create a session you need to explicitly
indicate that in your JSP. For example:
+ {{{
+   <%@ page session="false" %>
+ }}}
+ This is important in scenarios where you are doing load testing and using custom HTTP clients,
because these clients may not be handling sessions correctly and thus end up creating a new
session every time they access the page.
+ One known category of misbehaving clients are web bots. To deal with them you can configure
a [[|CrawlerSessionManagerValve]].
+ It is also possible to limit the number of active sessions by setting '''maxActiveSessions'''
attribute on a [[|Manager]] element,
+ {{{
+ <Context>
+ <Manager maxActiveSessions="500" />
+ </Context>
+ }}}
+ ----

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

View raw message