socketInactivityTimeout

socketInactivityTimeout

This setting was added in Profound.js 5.3.0. In prior releases, the inactivity timeout on connections to the server is 1 hour and is not configurable.

As of Profound.js Version 7.31.0, if socketInactivityTimeout is not explicitly set, it will automatically align with the timeout setting (converted from seconds to milliseconds).

This setting is used to adjust or disable the inactivity timeout on connections to the server. The inactivity timeout is used to abort long-running requests.

The value specified for this property is passed to the server.setTimeout() method.

Valid values are:

  • 0 - Disables inactivity timeout

  • Integer > 0 - Sets inactivity timeout, in milliseconds

The default value if this setting is not specified is 3600000 (1 hour).

For Example:

Set inactivity timeout to 2 minutes:

"socketInactivityTimeout": 120000 // Set inactivity timeout to 2 minutes.

Disable inactivity timeout:

"socketInactivityTimeout": 0 // Disable inactivity timeout.

Auto-Alignment with timeout Setting

As of Profound.js Version 7.31.0, if socketInactivityTimeout is not explicitly set, it will automatically align with the timeout setting (converted from seconds to milliseconds).

For Example:

  • If timeout is set to 7200, then socketInactivityTimeout will default to 7200000 (2 hours).

  • If neither setting is specified, the default remains 3600000 (1 hour).

In previous versions, socketInactivityTimeout always defaulted to 3600000 (1 hour) regardless of the timeout setting. This could cause premature socket termination in proxy mode when the timeout exceeded 1 hour. With auto-alignment, socket-level timeouts now match the session timeout automatically, preventing these premature disconnections.