Hi All, We use Apache as the webserver and tomcat 4.1 servlet engine. In our application we have given the max session timeout to be 1 hour. For some reason during a particular hour of the day when the users logs in they are logged out automatically after 10 to 15 minutes. I could not see any error trace in front end logs. The traffic is also not high during that time.So I am wondering what is causing the user to logout automatically?
I am clueless here. I would appreciate if someone can help me out in this issue.
As you can see its very difficult to find whats wrong with your deployment. However I will try to help you debug this issue. 1.write a class that implements HttpSessionListener 2.Override sessionCreated() & sessionDestroyed() method and get accession to HttpSession object 3.Print when this session was created/last accessed etc (additional info abt session) 4.write Entry for this class in web.xml under Listener tag. 5.start application, wait for session time out after 15mins (for incorrect timeouts) 6.Debug which session got terminated and if there is any specific reasons behind it.(i.e. By calling session.invalidate() somewhere else in code etc)
Not sure if this helps but HOPE SO.. V
SCJP <br />SCWCD <br />SCBCD <br />SCEA-1
Joined: Aug 02, 2003
Hi, Thanks for the immediate reply. This issue is happening in production but not consistant. This is a clustered environment so I am not sure how to debug this further. I can certainly use the sessionCreated and sessionDestroyed method in Dev env again but not sure how to recreate this issue.