tcpKeepAlive

tcpKeepAlive

This setting was added in Profound.js 5.3.0. In prior releases, TCP keepalives are disabled on connections to the server.

Description

This setting disables TCP keepalives on connections to the server, or adjusts the TCP keepalive time.

TCP keepalives are used to automatically detect and dispose of broken connections. For an explanation of the process, see the TCP keepalive section of this article. This setting corresponds to the keepalive time value, and is passed to the Node.js socket.setKeepAlive() method for all inbound server connections.

Valid Values

  • 0 - Disables TCP keepalives;

  • Integer > 0 - Sets the TCP keepalive time, in milliseconds.

The default value, if this setting is not specified, is 300000 (5 minutes).

TCP keepalive is not the same thing as HTTP keepalive.

Example 1: Lengthen the Keepalive Time

"tcpKeepAlive": 600000 // Set TCP keepalive time to 10 minutes

Example 2: Disable TCP Keepalives

"tcpKeepAlive": 0 // Disable TCP keepalives

For information on how to modify this setting, see Configuration File.