Hi,

I'm trying to force expirations of inactive sessions in Tomcat. (For some reason, sessions that are inactive longer than timeout don't expire automatically - not sure why?)

I can do it just fine, from the Tomcat Manager web app, by clicking the "Expire Sessions" button.

I've tried doing it programmatically by using "http://localhost:8080/manager/text/expire?path=/zzz" from a script running on the server:
    wget -O /dev/stdout --http-user=xxx --http-password=yyy "http://localhost:8080/manager/text/expire?path=/zzz"

(I made sure that Tomcat user xxx has manager-script permissions). I get the following output:

K - Session information for application at context path /grok
Default maximum session inactive interval 20 minutes
<1 minutes: 9 sessions
1 - <2 minutes: 8 sessions
2 - <3 minutes: 11 sessions
3 - <4 minutes: 4 sessions
4 - <5 minutes: 6 sessions
5 - <6 minutes: 5 sessions
6 - <7 minutes: 9 sessions
7 - <8 minutes: 5 sessions
8 - <9 minutes: 11 sessions
9 - <10 minutes: 7 sessions
10 - <11 minutes: 10 sessions
11 - <12 minutes: 7 sessions
12 - <13 minutes: 6 sessions
13 - <14 minutes: 5 sessions
14 - <15 minutes: 9 sessions
15 - <16 minutes: 7 sessions
16 - <17 minutes: 9 sessions
17 - <18 minutes: 6 sessions
18 - <19 minutes: 9 sessions
>=20 minutes: 666 sessions

but when I check with the Tomcat Web manager app in my web browser, I still see a lot of unexpired sessions (older than inactive interval) - which I can then manually expire, by clicking "Expire Sessions" button in the web app!

How can i do this automatically? (And/or why don't they expire automatically anyway)?

Thanks,
Kirill



--
Kirill Kireyev, PhD
Founder/CTO instaGrok.com
kir...@instagrok.com
Twitter: @instaGrok
FB: facebook.com/instagrok

Reply via email to