Salesforce

OpenEdge How to configure the TCP Keepalive parameters for Linux ?

« Go Back

Information

 
TitleOpenEdge How to configure the TCP Keepalive parameters for Linux ?
URL Name000044970
Article Number000164414
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x
OS: Linux
Other: TCP
Question/Problem Description
How to configure the TCP Keepalive parameters for Linux ?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
In Linux, TCP keepalive parameters are:
 
tcp_keepalive_intvl
tcp_keepalive_probes
tcp_keepalive_time

Their default values are:
 
tcp_keepalive_time = 7200 (seconds)
tcp_keepalive_intvl = 75 (seconds)
tcp_keepalive_probes = 9 (number of probes)
 

This means that the keepalive process waits for two hours (7200 secs) for socket activity before sending the first keepalive probe, and then resend it every 75 seconds. If no ACK response is received for nine consecutive times, the connection is marked as broken. 

For example, to reduce the value of /proc/sys/net/ipv4/tcp_keepalive_time from 7,200 (2 hours) to 900 (15 Min) we can use  the command: 
 
echo 900> /proc/sys/net/ipv4/tcp_keepalive_time 

On many flavors of Linux, the tool to manipulate TCP Keepalive setting is sysctl.

Example:

sysctl -w net.ipv4.tcp_keepalive_time=300 
 
The above two methods of changing TCP Keepalive are temporary and will only last until the system is rebooted.

A more permanent change to TCP Keepalive will require a change to the /etc/sysctl.conf file.

Example:

To make a permanent change to decrease TCP Keepalive time before testing to 300 seconds (5 minutes), edit /etc/sysctl.conf file and add: 
 
net.ipv4.tcp_keepalive_time=300 

Note: Changing TCP keepalive parameters in Linux will require root user permissions
 
Workaround
Notes
Keyword Phrase
Last Modified Date2/27/2018 4:07 PM

Powered by