https://www.linux.org/threads/reduce-your-apache-time_wait-connections.4505/
netstat -nat | awk '{print $6}' | sort | uniq -c | sort -n
1 CLOSE_WAIT 1 established) 1 Foreign 1 SYN_RECV 6 ESTABLISHED 29 LISTEN 317 TIME_WAIT
cat /proc/sys/net/ipv4/tcp_fin_timeout
cat /proc/sys/net/ipv4/tcp_tw_recycle
cat /proc/sys/net/ipv4/tcp_tw_reuse
60 – 0 – 0
echo 30 >/proc/sys/net/ipv4/tcp_fin_timeout
echo 1 >/proc/sys/net/ipv4/tcp_tw_recycle
echo 1 >/proc/sys/net/ipv4/tcp_tw_reuse
30 – 1 -1