Tech Tip: What does Postponed Session Expired mean?
PRODUCT: 4D Server | VERSION: 12 | PLATFORM: Mac & Win
Published On: March 24, 2011
(This Tech Tip applies to both 4D v11 SQL and 4D v12; the situation for 4D v11 SQL is explained first)
The error "Postponed Session Expired" is an error that can occur under normal 4D Remote operation. This Tech Tip explains what this error means.
In 4D v11 SQL there are 3 connections made to the server for every global client process:
- Application server (19813 default)
- DB4D server (19814 default)
- SQL server (19812 default)
The "Postponed session expired" error pertains to the DB4D server connection and also the "Idle Connections Timeout" setting offered as a database parameter.
By default in 4D v11 SQL there is no idle connections timeout. If default settings are used, the "Postponed session expired" error should never be encountered. This will make more sense in a moment.
If a non-default idle connections timeout is used (for example 20 seconds), here is what 4D does:
- When a DB4D request to the server completes a 20 second timer starts.
- If there is no further request within the next 20 seconds, the TCP connection for the DB4D process is closed.
- VERY IMPORTANT: this is a negotiated closure. The server and client are both aware of it. If they are not both aware of it, that's a network problem (something on the network severed the connection).
- Though the TCP connection is gone, the server still maintains session information for that connection. The session is thus "postponed".
- If the client process later attempts some DB4D connectivity, the TCP connection is automatically restored and the session information on the server is used. Thus the 20 second timer starts again.
- If the client does *not* make any subsequent attempt at DB4D connectivity, the postponed session will eventually "expire". This means the server clears all of the session information and any attempt to reconnect will fail with the "Postponed session expired" error message.
- The timeout for session expiration is something like 24 hours. Meaning the client process would need to sit idle for a full 24 hours before seeing this error message under *normal circumstances*.
Please note that in 4D v12 the story is slightly different. 4D v12 has a default value of 20 seconds for Idle Connections Timeout. But otherwise it should behave as above.
See Also: