Written by

Article Hiroshi Sato · Apr 3, 2025 1m read

Note about the StayConnected setting for TCP adapters

InterSystems FAQ rubric

The default settings for Stay Connected and Pool Size for business hosts using the TCP adapter are as follows:

StayConnected = -1(no timeout)
PoolSize = 1

If a network problem causes a connection to a business host to be lost, the production side will be unable to detect this and will not accept new connections. In this situation, no event is recorded in the event log. If StayConnected is set to its default value (-1), connections will not time out, and you will need to restart the business host before it can accept new connections. We recommend setting StayConnected to a value greater than or equal to 0 to avoid this situation.

For example, if you set it to 300 (seconds), a TCP business host can automatically disconnect and reconnect if it does not receive any new messages for 300 seconds or more.

For busy systems, you would typically set the StayConnected value to a smaller value, such as 5 seconds.

Comments

Scott Roth · Dec 26, 2025

Great tip, for connections that go through our Firewall to outside of our network using a VPN we typically use a setting of 3600 to ensure we are getting a fresh connection after a period of inactivity.  I have found especially with some of our applications that use AWS, that they are not respecting the Disconnect, so we have to ensure our settings match theirs.

0