Session timeout behavior curiosity
Session timeout behavior curiosity
- Subject: Session timeout behavior curiosity
- From: Gavin Eadie <email@hidden>
- Date: Thu, 9 Mar 2006 16:47:16 -0500
Every now and then, I find myself digging into aspects of how WebObjects works!
My latest curiosity relates to session timeouts. For some reason, I
wanted to know how accurate the timer was so I instrumented my
sandbox application to log passage through session construction and
termination, set the timeout to 60 seconds via
WOSession.setTimeOut(60D), and ran it. I created a few sessions over
a couple of minutes, and watched.
What I see is:
... of the first five sessions the first session took about 118
seconds, and the last one about 71 seconds; sessions 6-9, started
more than a minute after session 1, all timed out exactly 60 seconds
after the first batch; the last session, timed out exactly 60 seconds
after that.
... the timeouts happen in groups, 60 seconds apart
... [not in this log] I've seen sessions timeout in less than 60 seconds
This is not the most crucial puzzle of the month, but if anyone
does have some understanding of what is expected, and feels inclined
to comment, I'd be interested.
My hypothesis is that WOApplication (or a close buddy, the Timeout
Thread) runs a timeout timer that 'ticks' every WOSession.setTimeOut
seconds and terminates any sessions whose time is up (or nearly up,
if my <60 second terminate wasn't a hallucination), and the WOSession
counts down an inactivity clock which doesn't actually terminate the
session at zero, but marks it (unresponsive?) and ready for
termination. Now I've thought about it, it makes sense!
_____________________________________________
[ 12:19:24 WorkerThread0] Session : --- --- constructor
[ 12:19:39 WorkerThread0] Session : --- --- constructor
[ 12:19:39 WorkerThread1] Session : --- --- constructor
[ 12:19:39 WorkerThread1] Session : --- --- constructor
[ 12:20:11 WorkerThread2] Session : --- --- constructor
[ 12:20:31 WorkerThread2] Session : --- --- constructor
[ 12:20:31 WorkerThread3] Session : --- --- constructor
[ 12:21:00 WorkerThread4] Session : --- --- constructor
[ 12:21:16 WorkerThread4] Session : --- --- constructor
[ 12:21:22 Timeout Thread] Session : --- --- terminate
[ 12:21:22 Timeout Thread] Session : --- --- terminate
[ 12:21:22 Timeout Thread] Session : --- --- terminate
[ 12:21:22 Timeout Thread] Session : --- --- terminate
[ 12:21:22 Timeout Thread] Session : --- --- terminate
[ 12:21:31 WorkerThread5] Session : --- --- constructor
[ 12:22:22 Timeout Thread] Session : --- --- terminate
[ 12:22:22 Timeout Thread] Session : --- --- terminate
[ 12:22:22 Timeout Thread] Session : --- --- terminate
[ 12:22:22 Timeout Thread] Session : --- --- terminate
[ 12:23:22 Timeout Thread] Session : --- --- terminate
_______________________________________________
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
References: | |
| >Shorter URL (From: Dave Elsner <email@hidden>) |