Consultor Eletrônico



Kbase P98399: How does the TCP KeepAlive mechanism work
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/18/2011
Status: Verified

GOAL:

How does the TCP KeepAlive mechanism work

GOAL:

Does the KeepAlive mechanism disconnect TCP/IP connections

FACT(s) (Environment):

All Supported Operating Systems
Progress/OpenEdge Product Family

FIX:

The KeepAlive mechanism does not disconnect /idle/ TCP/IP connections
When there is an established socket connection, and the connection is idle, NO packets are transmitted.
Thus there is no way to tell if the connection is still valid without sending some data and seeing if you get an error.

KeepAlive detects situations where one side of the connection has gone away for some reason. It does this by sending low-level "probe" messages to see if the other side responds. If it does not respond to a certain number of probes within a certain amount of time, then it assumes the connection is dead and the process using the socket can detect this through an error indication.

There is a system-wide timeout parameter that controls how long a connection has to be idle before it starts probing and how often probes are sent. The default value of the idle time before probes begin is two hours. It can probably be lowered to 5 minutes without too many unwanted side effects.

But be aware that it affects the whole system.

The Progress OpenEdge RDBMS server will write an error message to the database log when it is informed (by the TCP/IP stack) that the connection has been dropped.