Session TimeOut


In Liferay session timeout will be 30 mins by default. If you were idle for 30 mins liferay will expire the session.

Sometimes based on the requirement we want to increase the session timeout.

So look into the portal.properties  file and search for the "session.timeout"  we can see the  minutes it was set. By default it was 30 minutes.
#
# Specify the number of minutes before a session expires. This value is
# always overridden by the value set in web.xml.
#
session.timeout=30


Even if we increase this value it would effect because it will be override the entry in the web.xml . so as best option remove the entry in the web.xml

Navigate to the tomcat folder as <tomcat>/webapps/ROOT/WEB-INF/web.xml

Search for the entry "session-timeout" you can find the following snippets.


30



Remove this entry in the web.xml and increase the value in the portal-ext.properties to your value, suppose if i need to increase the session timeout to 1 hour we can set as,

session.timeout=60



That it restart the server, your changes will work as excepted.

Comments

  1. Is there any absolute session timeout concept? Even user is active, if I want to force session timeout after say 4 hours, how do I do that?

    ReplyDelete

Post a Comment

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate