- Published on
Investigation · Part 7 of 10 · Following a TCP connection
TIME_WAIT: Why a Closed Connection Stays Around
My client and my server closed 500 connections, and the kernel kept 500 sockets for 60 more seconds. I measured which side keeps TIME_WAIT, why tcp_fin_timeout does not change it, how the client side runs out of local ports, and why a restarted server can fail to bind.