2 Replies Latest reply on Jan 25, 2005 4:26 PM by mcorey

    HttpSession times out even when it should be active

    mcorey

      I am having a problem with my HttpSessions occasionally timing out when, in fact, there is normal activity. I have a web app that is keeps a small amount of login information about a user in the HttpSession when they login. The client is a C-based fat client, which sends a 'touch' message every 30 minutes so that the HttpSession doesn't time out, and I have configured the sessions to be resident for 45 minutes before they do time out.

      What is happening is that I'm getting a user login (say, at 9:00 AM)... 30 minutes later, I am receiving a 'touch' message that does find the HttpSession properly, pulls an attribute out of the session, changes it, and reinserts it into the HttpSession... 15 minutes later, my session times out...

      This works perfectly on my development box (Windows, single machine), but doesn't appear to be working in our production environment (Linux, cluster of 6 machines. jbossweb cluster configured as interval, of 2000 ms, with UseLocalCache set to false)...

      Any ideas?

        • 1. Re: HttpSession times out even when it should be active
          anil.saldhana

          have you set the session time out in web.xml of your war?

          <session-config>
           <session-timeout>30</session-timeout>
           </session-config>


          The default timeout used by the tomcat instance is under deploy/jbossweb-tomcatxxx.sar/conf/web.xml

          You shud override in your web.xml

          • 2. Re: HttpSession times out even when it should be active
            mcorey

            Yes, I have done this -- I set it to 45 minutes, and it is honoring that... like I said, at 9:00 the user logs in, at 9:30 the user sends a touch request, and at 9:45 the session expires... when the touch request comes in, however, it SHOULD move the expire time out to 10:45 (45 minutes from the last access), but it's not doing this for some reason...