Re: Apps that don't release unused sessions
Re: Apps that don't release unused sessions
- Subject: Re: Apps that don't release unused sessions
- From: Chuck Hill <email@hidden>
- Date: Thu, 27 Jan 2005 19:08:48 -0800
Hi George,
I've seen this happen in two situations, the resolution is dependent on
the cause.
One cause in an exception raised in session.sleep() which prevents the
session from being checked back into the store. If is session is not
checked in, it can't expire. There are some other less common methods
in Application that suffer from the same problem, I think. If you have
a sleep() method in your session, ensure that it can't throw.
The other cause is deadlock preventing the session from terminating.
This can happen at the session level or at the level of the thread that
manages session timeouts. If the session timeout thread gets
deadlocked then no other sessions can timeout so this is probably not
the case for you. Single session deadlock can happen when an extra
lock is left on the defaultEditingContext(). The next request for that
session that comes in will deadlock that thread. As the request never
gets processed, the session does not get checked back into the session
store and hence never times out. In the worst case, there are no more
requests for that session and it timesout. terminate() also locks the
defaultEditingContext() and this will result in the session timeout
thread deadlocking.
Aside from inspecting methods in session and application to ensure an
exception can't be thrown, the place the start debugging this is to get
a thread dump from the JVM when this happens. That should indicate if
there is a deadlock and where it is. Then the fun begins!
Chuck
On Jan 27, 2005, at 5:57 PM, George Domurot wrote:
We have an app that doesn't want to release inactive sessions (usually
just 1). This becomes a problem during scheduled graceful cycling.
Has anyone seen this occur? Any ideas about resolution?
There are other apps running under the same deployment scenario for
more than a year, all smooth.
Any input is appreciated.
Thanks,
George
--
George Domurot
email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden