Foren

Session timeout

Trey Howard, geändert vor 11 Jahren.

Session timeout

Junior Member Beiträge: 38 Beitrittsdatum: 10.05.11 Neueste Beiträge
Hi All

Several of our users have reported a problem using the portal after having left their browser open for an extended period of time.
This results in the page showing the Not Authorized error in several of the portlets (see attached screenshot).

I have modified the ROOT/WEB-INF/web.xml to define <session-timeout>0</session-timeout> but this has not remedied the problem.
Is there an option in the Control Panel or properties file that will prevent session timeout? Or at least make it large enough to not be a problem.

Any help would be greatly appreciated.

-Trey

Edit: I have already defined the appropriate 'session.timeout' settings in portal-ext.properties:
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/session
thumbnail
Sandeep Nair, geändert vor 11 Jahren.

RE: Session timeout

Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
I would say not to change session-timeout in web.xml or portal-ext.properties if you never want to timeout session until user has closed the browser.

Set the following properties in portal-ext.properties

#
    # Specify the number of minutes before a warning is sent to the user
    # informing the user of the session expiration. Specify 0 to disable any
    # warnings.
    #
    session.timeout.warning=0

    #
    # Set the auto-extend mode to true to avoid having to ask the user whether
    # to extend the session or not. Instead it will be automatically extended.
    # The purpose of this mode is to keep the session open as long as the user
    # browser is open and with a portal page loaded. It is recommended to use
    # this setting along with a smaller "session.timeout", such as 5 minutes for
    # better performance.
    #
    session.timeout.auto.extend=true


Regards,
Sandeep
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Session timeout

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Yeah, Sandeep is right. If you don't want the session to expire, use the session.timeout.auto.extend=true property in portal-ext.properties.
Suryakant Panda, geändert vor 7 Jahren.

RE: Session timeout

New Member Beiträge: 5 Beitrittsdatum: 23.06.16 Neueste Beiträge
Hello David,
I am relatively new to Liferay. Currently, each of our applications in the Liferay portal have their own timeout settings in respective web.xml.
Hence users have problem when they switch between applications.
The expectation is to have common timeout settings for all the applications and should keep all the applications alive in one session.
In other words, if I open a new browser session, open 2 applications in 2 tabs and work on app #1 for long time, app #2 should not timeout as I am still active in app #1.

I tried putting the session.timeout in portal-ext.properties file and commenting out app specific web.xml settings. Also tried putting in tomcat web.xml under conf and also under web-inf/ROOT, but doesn't work.

Any help please ?

Thanks,

Setting global timeout at portal level for multiple web apps