My Oracle Support Banner

Oracle Linux: TCP Keepalive Setting (net.ipv4.tcp_keepalive) Changes Are Not Reflected Leading to Application Max Connection Error (Doc ID 2579656.1)

Last updated on FEBRUARY 20, 2021

Applies to:

Linux OS - Version Oracle Linux 5.2 to Oracle Linux 8.0 [Release OL5U2 to OL8]
Linux x86
Linux x86-64

Symptoms

On Weblogic application Server which connect to IBM MQ, TCP connections are not getting closed even after lowering kernel values:

net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 7200


Still Weblogic connections grow every hour:

# netstat_-W_-neopa |grep -i IP_IP_IP_IP
tcp 0 0 IP_IP_IP_IP:59364 IP_IP_IP_IP:1414 ESTABLISHED 1006 3221533 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:59567 IP_IP_IP_IP:1414 ESTABLISHED 1006 3217813 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:60025 IP_IP_IP_IP:1414 ESTABLISHED 1006 3220600 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:60165 IP_IP_IP_IP:1414 ESTABLISHED 1006 3218743 20771/java off (0.00/0/0)

After some time:

# netstat_-W_-neopa |grep -i IP_IP_IP_IP
tcp 0 0 IP_IP_IP_IP:59567 IP_IP_IP_IP:1414 ESTABLISHED 1006 3217813 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:60025 IP_IP_IP_IP:1414 ESTABLISHED 1006 3220600 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:60165 IP_IP_IP_IP:1414 ESTABLISHED 1006 3218743 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:59567 IP_IP_IP_IP:1414 ESTABLISHED 1006 3217813 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:60025 IP_IP_IP_IP:1414 ESTABLISHED 1006 3220600 20771/java off (0.00/0/0)
tcp 0 0 IP_IP_IP_IP:60165 IP_IP_IP_IP:1414 ESTABLISHED 1006 3218743 20771/java off (0.00/0/0)

This will lead to maximum connection reach under OS after some time

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.