[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Session timeout
|
On 06/09/2017 03:55, Jan Bartel wrote:
John,
As you can see on your log trace, each session contains a timer that
expires when the session maxInactiveInterval is reached. When the timer
expires, that session is queued for attention by the scavenger.
Why not call sessionDestroyed() at this point? I presume that this is
what older versions of Jetty used to do, since sessionDestroyed() always
used to be called at precisely the correct time and the session object
was still accessible inside it. This would accord with the servlet spec
where it says that sessiondestroyed() is called when "a session is
*about to be* invalidated", not "some time after the session has been
invalidated".
By default the scavenger thread only runs once every 10mins, so it is
timing dependent exactly when the session will be scavenged wrt when the
session expires.
And yet:
On 6 September 2017 at 01:26, John English <john.foreign@xxxxxxxxx
<mailto:john.foreign@xxxxxxxxx>> wrote:
Correction: with a 5 minute timeout and no DEBUG flag,
sessionDestroyed() gets called automatically after TWENTY minutes!
This is 15 minutes after the session expires, which is well outside the
10-minute period. So, hmm, I'm still baffled.
--
John English