tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl" <>
Subject Session timeout
Date Mon, 14 Aug 2006 14:19:02 GMT
All who can help,

I am having a problem getting Tomcat to time the session out.

The setup:

Tomcat 5.5.9 running on Slackware using Java 5.

The issue:

We have two general classes of users: Administrator types who need a long session timeout
and casual users who need a very short timeout.

Several times a year, we get many requests by casual users (100's per minute for hours at
a time.)  They come to a jsp that has the max inactive interval set to 120 seconds i.e., session.setMaxInactiveInterval(120).
 Yet, after 24 hours, some of these sessions are still active.  I have checked at various
points on this page and the session timeout is reported as being set to 120 (this page presents
some information gathered from a database and the user's selection will then make another

We have a listener that removes some information that could have been stored for the user.
 If I force a session end with session.invalidate(), I can see the listener being hit.  But,
without programatically forcing an end to the session, it never hits the listener.

The other class of user (the administrators) is equally flaky but in the other direction.
 Sometimes the session is active for a long time (maxInactiveInterval is set to 7200 seconds)
and sometimes it goes dead after a fairly short time (say, 15 minutes.)  I suspect the 'going
dead' issue is caused by the database connection being timed out and I am investigating that

What I am trying to determine is how to control the session inactive period.

Thanks in advance for any and all help.


View raw message