On Aug 20, 2008, at 9:54 AM, Simon McLean wrote:

Hi All -

Wondering if someone can throw me some ideas on solving what looks like an immortal session problem.

- Start up 1 instance in java monitor.
- User lands on sessionless login page. No sessions.
- User logs in. 1 session.
- User logs out. 0 sessions.
- User logs in. 1 session.
- User does nothing. Session times out. 0 sessions.

All looks good. However, we get to the end of the day and the instance has 376 active sessions. But I know for this particular app there are only 6 users, because they are all sitting next door :-) Also, If i now leave this instance overnight none of those active sessions will go away.

So what could be going on ? Something appears to be creating immortal sessions, but forced session termination (by the user logging out) and session expiration seem to be behaving themselves.


If the users don't notice any problems, my money would be on an exception thrown from your Session.terminate(). Also check the sleep() method to ensure it can never throw.

I have seen a related problem where two requests come in for the same session (user double clicks, Ajax etc), and the first calls terminate() on the session. The second thread is stuck and the app can't gracefully shut down. IIRC, you would see zero sessions in this case. The "fix" for this is to not call terminate() and instead set the session timeout to a small number of seconds.

Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to