-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Description
We are running out of sockets on CDN 3.1.0, used as remote under a not particularly high load
CDN doesn't respond anymore and systemd[10153]: Reached target Sockets. is logged in /var/log/syslog
The current range of ephemeral ports is
# cat /proc/sys/net/ipv4/ip_local_port_range
32768 60999
And TCP connection should be reused
net.ipv4.tcp_tw_reuse = 1 set in /etc/sysctl.conf
(See https://vincent.bernat.ch/en/blog/2014-tcp-time-wait-state-linux)
Nevertheless we end up with a huge amount of sockets stuck in TIME_WAIT
# netstat -an | grep TIME_WAIT | wc -l
32773
Possibly the library used for remote connections is not dropping / reusing the TCP connections?
As a temporary patch we have increased the number of ephemeral ports