How to update Tomcat's inactivity timeout value?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

PAM Self-Hosted Articles
2 min read
L1 Bithead
No ratings

The PSM HTML5 gateway closes user sessions after 30 minutes every time. The following error from the HTML5 Weblog.

Error: [PSMGW][19:01:36.712][[Catalina-utility-1]][ERROR][c.c.p.m.s.CAPSMGWHttpSessionListener]: Session inactivity time out expired. Open tunnels will be closed

This is due to the timeout that contains a default value of 30 minutes.

Issue

PSM html5 gateway, user sessions are getting closed after 30 mins everytime. the below error from html5 weblog. its affecting our production access. please help to resolve this as soon as posibble. Error: [PSMGW][19:01:36.712][[Catalina-utility-1]][ERROR][c.c.p.m.s.CAPSMGWHttpSessionListener]: Session inactivity time out expired. Open tunnels will be closed

Environment

PSM PSM HTML5 Gateway

Cause

Default time out value is only 30 mins.

Resolution

Edit the following file:
/opt/tomcat/webapps/guac/WEB-INF/web.xml

Locate the following section:
<session-config>
<session-timeout>30</session-timeout>

Default is 30 minutes. You can change to the desired value and restart tomcat service.

Additional Note:
There could be issues with connections which uses proxy or other possible reasons which impacted the packet which HTML5 receives. And this will cause the session validation to always fail and hence having the same disconnection behaviour. 

We can also workaround by disabling the keepalive checks:
==
1. in /opt/tomcat/conf/server.xml addon into settings of connector
keepAliveTimeout="-1" useKeepAliveResponseHeader="false"
2. in /opt/tomcat/webapps/guac/WEB-INF/web.xml change from 30 to 1440 
<session-timeout>1440</session-timeout>
3. in /etc/opt/CARKpsmgw/webapp/psmgw.conf change from 60 to 0
KeepAliveInterval=0
==

Disclaimer: This is only intended as a workaround. And only configurable with self-hosted RPM deployment of HTML5GW. 

Steps

Edit the following file:

/opt/tomcat/webapps/guac/WEB-INF/web.xml

Locate the following section:

<session-config>

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

Default is 30 minutes. You can change to the desired value and restart tomcat service.

 

Additional Note:

There could be issues with connections which uses proxy or other possible reasons which impacted the packet which HTML5 receives. And this will cause the session validation to always fail and hence having the same disconnection behaviour. 

 

We can also workaround by disabling the keepalive checks:

==

1. in /opt/tomcat/conf/server.xml addon into settings of connector

keepAliveTimeout="-1" useKeepAliveResponseHeader="false"

2. in /opt/tomcat/webapps/guac/WEB-INF/web.xml change from 30 to 1440 

<session-timeout>1440</session-timeout>

3. in /etc/opt/CARKpsmgw/webapp/psmgw.conf change from 60 to 0

KeepAliveInterval=0

==

Disclaimer: This is only intended as a workaround. And only configurable with self-hosted RPM deployment of HTML5GW. 

Rate this article:
  • 4360 Views
  • 0 comments
  • 0 Likes
Article Dashboard
Version history
Last Updated:
‎10-12-2025 11:57 PM
Updated by: