KEEPALIVE

The KEEPALIVE option specifies whether the Transmission Control Protocol (TCP) keepalive function is enabled for outbound TCP sockets. The TCP keepalive function sends a transmission from one device to another to check that the link between the two devices is operating.

If you are using node replication, you can use the KEEPALIVE option on the source replication server to enable the TCP keepalive function. The KEEPALIVE option is not required on the target replication server unless you specify bidirectional replication, in which case the target server becomes the source replication server.

Syntax

Read syntax diagramSkip visual syntax diagram
              .-Yes-.   
>>-KEEPALIVE--+-No--+------------------------------------------><

Parameters

Yes
Specifies that the TCP keepalive function is enabled for outbound TCP sockets. This value is the default.
If the KEEPALIVE option is enabled, default values are used for the KEEPALIVETIME and KEEPALIVEINTERVAL options.
No
Specifies that the TCP keepalive function is not enabled for outbound TCP sockets.
If you specify a value of NO, it does not affect current TCP socket connections that originated from outbound connection requests while the KEEPALIVE option was set to YES. The YES value applies to those sockets until the related session ends and the socket is closed.

Example

Use the SETOPT command to enable the keepalive function without disabling or halting the server:

setopt keepalive yes