search cancel

WebApp timeout not working as expected


Article ID: 257886


Updated On:


CA Spectrum DX NetOps


We have the WebApp timeout disabled. However, one of our users reported they leave the WebApp open overnight and when they come back in the morning, the WebApp has disconnected.

A check of the $SPECROOT/webtomcat/bin/logs/webswing.log file shows the following:

2022-12-08 17:00:17,901 INFO  [Webswing Process Handler] ( [oneclickwebapp_anonym_b30376575f46_1670504860640] WARNING: Session inactive for 60 seconds.
2022-12-08 17:01:18,107 INFO  [Webswing Process Handler] ( [oneclickwebapp_anonym_b30376575f46_1670504860640] WARNING: Session inactive for 120 seconds.
2022-12-08 17:02:18,314 INFO  [Webswing Process Handler] ( [oneclickwebapp_anonym_b30376575f46_1670504860640] WARNING: Session inactive for 180 seconds.
2022-12-08 17:03:18,510 INFO  [Webswing Process Handler] ( [oneclickwebapp_anonym_b30376575f46_1670504860640] WARNING: Session inactive for 240 seconds.
2022-12-08 17:04:17,576 INFO  [https-openssl-nio-9443-exec-1] ( Websocket closed to app, instance [oneclickwebapp_anonym_b30376575f46_1670504860640], close code [1000], reason [Closing instance.]!

However, the the timeout is disabled in the $SPECROOT/webtomcat/webswing/webswing.config file:

      "swingSessionTimeout" : 300,
      "timeoutIfInactive" : false,


Release : Any

Component: WebApp


As reported by the customer the issue occurs outside of working hours - when leaving the computer on for a prolonged time.

During this time there is probably a short network interruption or a packet loss that terminates the websocket connection.

When this happens the disconnected dialog with a possibility to reconnect appears. If the user does not reconnect within 5 minutes the session is terminated.


To resolve the issue, add "autoReconnect=5000" to the $SPECROOT/tomcat/webapps/spectrum/webapp/index.jsp file as follows:

    var webswingInstance0 = {
        options: {
            autoReconnect: 5000,
            autoStart: true,
            args: getArgs(),
            recording: getParam('recording'),
            binarySocket: getParam('binarySocket'),
            debugPort: getParam('debugPort'),
            recordingPlayback: getParam('recordingPlayback'),

After adding, restart tomcat and webtomcat for the change to take affect.

This can be tested by logging into the webtomcat, disconnecting the client from the network for 5-10 minutes and then connecting back to the network.

Additional Information

This parameter will be included out of the box in Spectrum 22.2.6.