Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: User timeout session in the new Liferay 7.3.1 GA2
Hi,
With the new Liferay 7.3.1 GA2 version it seems that modify user session timeout is impossible.
We are using the liferay tomcat bundle. And we have the same problem on windows or unix.
We have modify our portal-ext.properties and add this line :
session.timeout=120
In the web.xml of our tomcat we modify those lines :
<session-config>
<session-timeout>120</session-timeout>
</session-config>
But the session still be 15 minutes.
In previous version of Liferay it works with those 2 modifications, what is wrong with 7.3 ?
Thanks for your help,
Eric.
With the new Liferay 7.3.1 GA2 version it seems that modify user session timeout is impossible.
We are using the liferay tomcat bundle. And we have the same problem on windows or unix.
We have modify our portal-ext.properties and add this line :
session.timeout=120
In the web.xml of our tomcat we modify those lines :
<session-config>
<session-timeout>120</session-timeout>
</session-config>
But the session still be 15 minutes.
In previous version of Liferay it works with those 2 modifications, what is wrong with 7.3 ?
Thanks for your help,
Eric.
Hmm.
I just tested it, with 7.3.1 GA2 on Linux with Java 8 and it works for me as expected. I changed the session-timeout in web.xml and the session.timeout in portat-ext.properties. I think, the portal-ext propteries setting only is relevant for the frontend, for the warning and session timeout message. The setting in tomcat/webapps/ROOT/WEB-INF/web.xml sets the actual session timeout.
Can you check the web.xml again?
Since your post is unclear, there are two web.xml files. There is another one in tomcat/conf/. Editing that one only sets only the default timeout.
I just tested it, with 7.3.1 GA2 on Linux with Java 8 and it works for me as expected. I changed the session-timeout in web.xml and the session.timeout in portat-ext.properties. I think, the portal-ext propteries setting only is relevant for the frontend, for the warning and session timeout message. The setting in tomcat/webapps/ROOT/WEB-INF/web.xml sets the actual session timeout.
Can you check the web.xml again?
Since your post is unclear, there are two web.xml files. There is another one in tomcat/conf/. Editing that one only sets only the default timeout.
Thank you Christoph,
You are right, it was the wrong web.xml.
It is now OK but maybe a comment in the wrong web.xml can help people like me to know there is another web.xml.
Thanks for your time,
Eric.
You are right, it was the wrong web.xml.
It is now OK but maybe a comment in the wrong web.xml can help people like me to know there is another web.xml.
Thanks for your time,
Eric.
I cannot believe this is really thing in 7.3
Im using docker and changes to files arent persistent, off course there is workaround but why liferay doesnt accept property set through ENV or through portal-ext.properties?
Im using docker and changes to files arent persistent, off course there is workaround but why liferay doesnt accept property set through ENV or through portal-ext.properties?
Peter Andreus:
I cannot believe this is really thing in 7.3
Im using docker and changes to files arent persistent, off course there is workaround but why liferay doesnt accept property set through ENV or through portal-ext.properties?
It doesn't? Please give steps to reproduce.
My Dockerfile doesn't contain anything special
in docker-compose.yml i set:
LIFERAY_SESSION_PERIOD_TIMEOUT: 120
I expect to have 120 min session.
When i check in Control Panel -> Server Administration -> Properties -> Portal Properties
i can see session.timeout = 120
Hovewer after 15 min of inactivity im still logged of liferay.
Maybe i messed up something in portal-ext.properties or in environment properties in docker-compose.yml?
in docker-compose.yml i set:
LIFERAY_SESSION_PERIOD_TIMEOUT: 120
I expect to have 120 min session.
When i check in Control Panel -> Server Administration -> Properties -> Portal Properties
i can see session.timeout = 120
Hovewer after 15 min of inactivity im still logged of liferay.
Maybe i messed up something in portal-ext.properties or in environment properties in docker-compose.yml?
Peter Andreus:
My Dockerfile doesn't contain anything special
in docker-compose.yml i set:
LIFERAY_SESSION_PERIOD_TIMEOUT: 120
I expect to have 120 min session.
When i check in Control Panel -> Server Administration -> Properties -> Portal Properties
i can see session.timeout = 120
Hovewer after 15 min of inactivity im still logged of liferay.
There are two ways to set this timeout, both with different behavior: The setting you describe above tells Liferay that sessions are 120 minutes long. This way Liferay may show a notice that the session soon runs out after 119 minutes and offer to extend it.
The other is the (mentioned further above) configuration in web.xml. It configures when Tomcat (or any appserver) considers a session to be inactive, and allows tomcat to discard the session. After all, those sessions are maintained by the appserver. Liferay has nothing to say in session management.
You want both to be set to the same value (or at least have the web.xml value be slightly higher than Liferay's value), for proper operation. Just changing one value only works when you go lower than the default value, not higher. The lowest of these values determines your expectation for overall session length.
bump for interest
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™