5

I want to reduce the session timeout from 30 minutes to 5 minutes. I went through the guidelines of Liferay communtiy like setting following properties in to portal-ext.properties file.

session.timeout=5

session.timeout.warning=0

session.timeout.auto.extend=true

But this is not working. Can any body help me please.

Laxman Rana
  • 2,904
  • 3
  • 25
  • 37
Md Shareef
  • 61
  • 1
  • 2
  • 8

3 Answers3

5

Session Time out can be set in portal-ext.properties and web.xml

i.e

portal-ext.properties

session.timeout=5
session.timeout.warning=0
session.timeout.auto.extend=false

web.xml

<session-config>
<session-timeout>5</session-timeout>
</session-config>

HTH

Laxman Rana
  • 2,904
  • 3
  • 25
  • 37
3

I found the solution in this thread: https://www.liferay.com/community/forums/-/message_boards/message/35735320

Change tomcat-{version}\conf\web.xml and tomcat-{version}\webapps\ROOT\WEB-INF\web.xml by setting session-timeout to 2 or even comment them out.

In your case change from

<session-config>
    <session-timeout>30</session-timeout>
</session-config>

to

<session-config>
    <session-timeout>5</session-timeout>
</session-config>

Also, as I noticed, the value of 0 disables timeout.

kolobok
  • 3,835
  • 3
  • 38
  • 54
0

You should change the default timeout for the portal (Liferay) and the application server (tomcat for example).

The portal timeout is in [tomcat]/webapps/ROOT/WEB-INF/web.xml:

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

The tomcat timeout is in [tomcat]/conf/web.xml:

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

After a restart, you can check the Liferay Control Panel, in Server / Server Administration: choose Properties > Portal Properties, and search for "session.timeout".

You should see your new timeout value.

Hope this helps, Philippe

PhilippeT
  • 116
  • 4