KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Idle Connection Timeout and Use Auto Client Reconnection
PRODUCT: 4D | VERSION: 11.5 | PLATFORM: Mac & Win
Published On: June 8, 2010

If you are currently using the “Use Automatic Client Reconnection” feature of 4D v11 SQL, you may want to consider using the IDLE CONNECTION TIMEOUT (Set Database Parameter: Selector 54) instead.

The IDLE CONNECTION TIMEOUT (Set Database Parameter: Selector 54) provides the developer with better granularity than the “Use Automatic Client Reconnect” feature.

For example, with IDLE CONNECTION TIMEOUT (Set Database Parameter: Selector 54) you can specify exactly how long 4D will wait (in seconds) before 4D places the socket connection in standby mode. Here is an explanation of what happens:

"When an idle connection reaches this limit, it is automatically put on standby, which freezes the client/server session and closes the network socket. This functioning is completely transparent for the user: as soon as there is new activity on the connection which is on standby, the socket is automatically reopened and the client/server session is restored."


On the other hand, the “Use Automatic Client Reconnect” option is simply a checkbox to enable or disable it. Here is a description of what happens:

"Use automatic client reconnection: This low-level function allows, in some specific configurations, the automatic reconnection of client machines in the case of unexpected disconnection. When the option (global for all client machines) is checked, the automatic client reconnection feature is used as soon as a client connection is lost. There is only one attempt: if the reconnection fails, an error -10002 is returned. If it is successful, an alert dialog box is displayed and a notification icon appears in the Windows task bar. For the automatic client reconnection feature to be available, the server-side timeout must be set to a value higher than 1 minute."


Each situation/network is different so there is no magic number for the IDLE CONNECTION TIMEOUT setting; however, this option gives the developer the ability to "fine tune" the settings for their specific situation and needs. Generally speaking, the IDLE CONNECTION TIMEOUT option is more favorable then the “Use Automatic Client Reconnection” option.

NOTE: These two options should not be enabled together. You will not see the expected results if they are used together.

See Also: