Well, we encounter this problem in our production environment every so often. 
If we run at sustained load for 2 hours we hit the wall in production. Keep in 
mind, our production environment has 4 clustered servers, so it takes about 1/4 
the amount of load per server to encounter the problem.

That being said, I think you are correct, we are creating sessions faster than 
they can be destroyed.

Is there a way to setup the context so that it doesn't automatically create a 
session? (Keep in mind, we aren't using JSP, we are using Tapestry - and I am 
not sure how to use Tapestry without a session.)

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com

-----Original Message-----
From: Mark Thomas [mailto:[email protected]] 
Sent: Saturday, January 09, 2010 5:13 AM
To: Tomcat Users List
Subject: Re: When running under high load (via load generating tools), Tomcat 
6.0.20 stops expiring sessions until the load subsides; causing thrashing on 
Garbage Collection

On 08/01/2010 23:07, Robin Wilson wrote:
> OK, I made the following changes (1 at a time) to 'server.xml', and retested:
> 
>     <Manager className="org.apache.catalina.ha.session.DeltaManager"
>         expireSessionsOnShutdown="false"
>         processExpiresFrequency="1"
>         notifyListenersOnReplication="true"/>
> 
> No discernable difference was noted on the retest (NOTE: I have measured the 
> sessions vs. the number of 'threads requesting pages', and I think that the 
> sessions are actually expiring - just _much_ slower than my load generator is 
> creating them. So I'm creating 100,000 sessions in 'n' time period, and in 
> that same time period only 6,000 are being expired and removed (the ratio 
> seems pretty constant - ~94% of the sessions created are staying around).
> 
> Then I made this change to 'server.xml':
> 
>     <Engine
>       name="tomcat"
>       backgroundProcessorDelay="1"
>       defaultHost="localhost">
> 
> Again, no discernable difference in behavior.
> 
> So, new question - is there a way to tell Tomcat to clear out larger numbers 
> of sessions at once? (Assuming they are past their "inactivity duration" 
> period?) Even when I shut off the load generators, it only clears the 
> sessions at a rate of a few thousand every second.

Given it works when the load is reduced, it looks like the expiration
logic is correct. One thing that would give you a bit more information
is setting the log level for org.apache.catalina.session.ManagerBase to
debug.

I wonder if you are simply creating sessions faster than the single
background thread can clear them out. If that is the case, how realistic
is your load? I'm happy to try a fix a genuine issue but I don't think
there is much benefit in making changes to address an artificial problem.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to