How to increase session timeout in Liferay?

Author: Ajay Choudhary

Liferay Version: 7.0, 7.1, 7.2, 7.3, 7.4

To increase session timeout in Liferay DXP, you need to adjust the session timeout settings in the file and the web.xml file. Here’s how you can do it:

1. Update the file

  1. Navigate to the folder where your Liferay instance is installed.
  2. Locate the file. If it doesn’t exist, you can create it in the same directory where is located.
  3. Add the following line to set the session timeout (in minutes). For example, to set the timeout to 60 minutes:

2. Update the web.xml file

  1. Locate the web.xml file. This file is usually found in the WEB-INF directory of your Liferay installation, typically at {Liferay_Home}/tomcat/webapps/ROOT/WEB-INF/web.xml.
  2. Open the web.xml file in a text editor.
  3. Find the <session-config> section and set the session-timeout parameter. For example, to set the timeout to 60 minutes, it should look like this:

3. Restart Liferay

After making these changes, you will need to restart your Liferay server for the changes to take effect.

Example for

# Set session timeout to 60 minutes

Example for web.xml:


By setting these parameters, you increase the session timeout to 60 minutes. Adjust the timeout value as needed for your requirements.

Make sure to back up your configuration files before making any changes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Thanks !

Thanks for sharing this, you are awesome !