Issue
- How do I modify Liferay's default session-timeout of any logged-in user?
Environment
- DXP 7.2
- DXP 7.3
- DXP 7.4
Resolution
- This value is set on the
[App_Server_HOME]/webapps/ROOT/WEB-INF/web.xml
file. You can manually adjust the property below, replacingX
for the timeout value in minutes.<session-timeout>X</session-timeout>
- Further, there is a session timeout portal property (see below) as well that can be added to the
portal-ext.properties
, but usually is overridden by the value set in web.xml. Also, the portal-ext property will sometimes only take effect if there is no<session-timeout>
property set on the web.xml file.
# Specify the number of minutes before a session expires.
#
# Env: LIFERAY_SESSION_PERIOD_TIMEOUT
#
session.timeout=15
- Alternative option to adjust session timeout is creating an Ext plugin to modify the web.xml
- Additionally in some versions of DXP 7.4 the session timeout must be set as the same value in both the web.xml file as well as the portal-ext properties file in order for session timeout to work correctly.
- And for DXP 7.1 please refer to the steps here
- Restart the DXP instance to fetch the new changes
Additional information
- Note: There are some application servers where the session-timeout is not correctly retrieved from the web.xml even if it is correctly specified.
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In