3

I found in Session Administrator of Tomcat 7 in list of active HTTPSessions the sessions with negative TTL. What does it mean? Why these sessions not died after expiration of timout-session?

There are more then 100 with negative TTL, already.

Any Ideas?

vyegorov
  • 21,787
  • 7
  • 59
  • 73
user1398055
  • 29
  • 1
  • 2

1 Answers1

3

It could mean one of three things. There is some overlap between the possibilities.

If the session expired between the point where the list of sessions was generated and when it was displayed to you -1 will be displayed.

If the session has passed the TTL but the background thread that expires sessions has not yet run, you'll see a small negative number indicating the number of seconds since the session passed its expiration time.

If the session is configured to never expire (0 or negative TTL) then you'll see a negative number which is TTL - seconds since last access.

There is clearly some scope for clarifying which situation applies. Tomcat has all the necessary information to figure out which it is.

Mark Thomas
  • 16,339
  • 1
  • 39
  • 60
  • Thanks you Mark for you answer. – user1398055 May 17 '12 at 04:55
  • My web.xml contains 60 and TTL for some sessions is less then -10 hours. No one from your suggestions applicable. May be tomcat has some other session-timeout configurations? – user1398055 May 17 '12 at 05:03
  • Session timeous in web.xml are in seconds, as are the values reported in the Manager UI. If you are seeing values around -10 hours then that suggests that the background processing thread has got stuck. A thread dump will confirm / deny that. – Mark Thomas May 17 '12 at 12:25
  • @MarkThomas I'm getting one unusual error in tomcat. Tomcat Manager shows me more than 50 active users for tomcat manager but I'm the only one who is logged into the server. Can you tell me why it shows me something like that to me. – Luffy Sep 30 '15 at 09:57
  • @MarkThomas Please check this link: http://stackoverflow.com/questions/32863522/tomcat7-shows-number-of-inactive-users-in-tomcat-manager – Luffy Sep 30 '15 at 10:17