Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-38965

The session does not auto extend when "session.timeout.auto.extend=true" is set

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.1.20 EE GA2
    • Fix Version/s: None
    • Component/s: Application Security
    • Environment:
      LIFERAY VERSION: 6.1 GA2
      OPERATING SYSTEM: Windows 7
      APPLICATION SERVER: Tomcat 7
      JAVA VIRTUAL MACHINE: Java 6
      DATABASE: MySQL 5.5
    • Fix Priority:
      3

      Description

      When the "session.timeout.auto.extend=true" property is set, the session still expires and does not auto extend.

      STEPS TO REPRODUCE
      1) Set the following property in portal-ext.properties:
      session.timeout.auto.extend=true
      2) Edit ROOT.war/WEB-INF/web.xml so that the session expires after 1 minutes
      3) Restart the server
      4) login as test@liferay.com
      5) Go to the home page
      6) Now wait for more than 1 min, keeping the browser window open
      7) Now after 1 mins click refresh and you will be directed to the login screen.

        Activity

        Hide
        olaf.kock Olaf Kock added a comment -

        In order for this to work, you'll have to let Liferay know that sessions are shorter. See portal.properties:

            #
            # Specify the number of minutes before a session expires. This value is
            # always overridden by the value set in web.xml.
            #
            session.timeout=30
        
        Show
        olaf.kock Olaf Kock added a comment - In order for this to work, you'll have to let Liferay know that sessions are shorter. See portal.properties: # # Specify the number of minutes before a session expires. This value is # always overridden by the value set in web.xml. # session.timeout=30
        Hide
        olaf.kock Olaf Kock added a comment -

        Please close as "Won't fix". As I stated in the comment above: If Liferay believes that the session length is 30 minutes, it doesn't need to refresh the session every less-than-a-minute, thus the appserver will time it out.

        Change the steps to reproduce to include the session.timeout configuration to be set to 1 as well and the session will be extended.

        AFAIK the servlet API does (or did) not allow to query the session timeout from the appserver, so that this setting must be configured independently of the Appserver in Liferay.

        I am routinely using this setting with the default timeouts of 30 minutes on all ends and even if I come back to my machine after more than an hour, all sessions are still alive - if you change the appserver's timeout, change Liferay's configuration as well and you're set.

        Show
        olaf.kock Olaf Kock added a comment - Please close as "Won't fix". As I stated in the comment above: If Liferay believes that the session length is 30 minutes, it doesn't need to refresh the session every less-than-a-minute, thus the appserver will time it out. Change the steps to reproduce to include the session.timeout configuration to be set to 1 as well and the session will be extended. AFAIK the servlet API does (or did) not allow to query the session timeout from the appserver, so that this setting must be configured independently of the Appserver in Liferay. I am routinely using this setting with the default timeouts of 30 minutes on all ends and even if I come back to my machine after more than an hour, all sessions are still alive - if you change the appserver's timeout, change Liferay's configuration as well and you're set.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              4 days ago

              Development

                Subcomponents