Change user timeout period in Tomcat
If you are using Tomcat as the application server and you want to change the time out period in Tomcat. By default, Tomcat logs you out of your Semarchy Application after 30 minutes, follow this guide to increase the time-out period to 3 hours.
Instructions
Semarchy does not set a timeout period. Therefore, Tomcat uses its default value of 30 minutes. It's often convenient to increase this time out period so you do not need to log in as frequently.
- Back up the
web.xml
file contained at the path/etc/tomcat8/web.xml
- Stop Tomcat:
sudo service tomcat8 stop
- Edit the
web.xml
file. - Change the following session-time value from 30 to 180:
- Change this:
<session-timeout>30</session-timeout>
- To
<session-timeout>180</session-timeout> <!-- 3 hours -->
- Change this:
- Restart tomcat:
sudo service tomcat8 start
Remember the timeout period also applies to the REST API sessions. You may end up with dozens of REST API sessions that remain open after making a connection because of the delayed timeout period. You can use Tomcat Manager to disconnect these sessions if they become an issue.
Related articles