tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rees <dr...@greenhydrant.com>
Subject Re: Tomcat Dies
Date Wed, 26 Nov 2003 01:17:13 GMT
Jeff Tulley wrote:
> 
> What I have seen is that if there is a reasonably heavy load for a
> short amount of time, you can have too many sessions in memory that have
> not yet hit their session timeout value, and so cannot be freed by the
> garbage collector.  It is very easy to run out of memory well before
> sessions start being let go.  As far as I can tell though, once the
> sessions were freed, the memory itself cleared up.  (These comments
> apply to 4.1.28 BTW)

Jeff, have you tried a different session manager than the default (which 
is org.apache.catalina.session.StandardManager)?  For example, 
org.apache.catalina.session.PersistentManager claims to be able to start 
swapping out inactive sessions to disk to save memory.

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html

A config like this inserted into your context should solve your memory 
issues with some performance hit if a session is swapped out to disk and 
is later swapped in.  However, the docs do warn that the manager hasn't 
been heavily tested.

<Manager className="org.apache.catalina.session.PersistentManager"
          minIdleSwap="-1"
          maxIdleSwap="120"
          maxIdleBackup="-1">
     <Store className="org.apache.catalina.session.FileStore"/>
</Manager>

The above config should swap out any sessions which haven't been 
accessed in the last 2 minutes.  You can also config a JDBC store.

-Dave


---------------------------------------------------------------------
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