tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: [PROPOSAL] When Session Max reached, throw out oldest session
Date Thu, 13 Jun 2002 00:43:40 GMT
+1 Thanks for the proposal Bob

Remy Maucherat wrote:
> 
> bob@jadn.com wrote:
> > PROPOSAL:  When Session Max reached, throw out oldest session
> >
> > Currently tomcat ships with the maximum number of sessions set to
> > unlimited.  They can expire by default after 30 minutes, however if
> > too many sessions are created within the 30 minutes, you can run out
> > of memory.
> >
> > To prevent running out of memory, you might choose to limit the
> > allowed number of active sessions.  If you use the default
> > StanardManager (session manager) you can set the "maxActiveSessions"
> > to effect a limit.  However if you exceed the number of allowed
> > sessions, a RuntimeException (IllegalStateException) is thrown.
> >
> > I propose two changes to reduce seeing these (IllegalStateException or
> > OutOfMemory) exceptions for sessions;
> >
> > 1. When the maximum number of sessions is reached, change
> > StandardManager from throwing an IllegalStateException exception, to
> > expiring the Least Recently Used (LRUMap) session.
> 
> The session manager definitely needs to go through a refactoring, and
> this is a good start. This behavior seems better to me, esp since it is
> possible to disable it (by setting maxActiveSessions to "-1").
> 
> > 2. Instead of defaulting to an unlimited number of sessions (and
> > getting visits from OutOfMemory), limit the number of sessions to
> > 10000 by default.
> 
> Going with an upper bound seems better for reliability in the default
> configuration.
> 
> +1.
> 
> Remy
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message