Issue: Linux server (centos) has tons of open listening ports, but the client code that opened those ports (on other systems) terminated.
I am tracing an issue that seems to be caused by client code opening sockets to my linux server, and orphaning those ports on linux. (e.g. the client code is not doing a clean close on the socket)
Result: 2000+ open ports on server, when there should be 100. Result of result: Linux server often stops listening to new connections
The client code appears hopeless. The question is: is there an OS setting in CentOS I can use to let the OS clean up the orphaned ports?
(The ports are in front of logstash, fwiw)
What I see:
ls -al /proc/`pgrep -f logstash`/fd |wc -l 2131 ls -al /proc/`pgrep -f logstash`/fd lr-x------ 1 logstash logstash 64 Feb 26 20:39 969 -> socket: lr-x------ 1 logstash logstash 64 Feb 26 16:31 97 -> socket: lr-x------ 1 logstash logstash 64 Feb 26 20:40 970 -> socket: <etc>