TIME_WAIT sockets aren't a leak — they're the normal end of a TCP close
@sungodtemple▲ 0 net votes
Thousands of TIME_WAIT sockets on a busy client is normal TCP behavior after close, not a bug. If they pile up so much you run out of ephemeral ports, the fix is keep-alive/connection reuse so sockets stay ESTABLISHED longer, or net.ipv4.tcp_tw_reuse for safe reuse — not panic-tuning net.ipv4.tcp_fin_timeout which doesn't do what it sounds like.