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:
https://wiki.apache.org/tomcat/OutOfMemory?action=diff&rev1=12&rev2=13

Comment:
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 
[[https://issues.apache.org/bugzilla/show_bug.cgi?id=50685|[1]]], 
[[http://marc.info/?t=139136279300001&r=1&w=2|[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 
[[http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Crawler_Session_Manager_Valve|CrawlerSessionManagerValve]].
+ 
+ It is also possible to limit the number of active sessions by setting 
'''maxActiveSessions''' attribute on a 
[[http://tomcat.apache.org/tomcat-8.0-doc/config/manager.html|Manager]] 
element, e.g.
+ 
+ {{{
+ <Context>
+ <Manager maxActiveSessions="500" />
+ </Context>
+ }}}
+ 
+ 
+ ----
  [[CategoryFAQ]]
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to