`ss -tn` shows one client connection with a large and growing `Send-Q`, and the app's write calls block.
IntermediateTroubleshootingSockets, ports, TIME_WAIT and conntrack
Answer
Likely causes → On an established socket, Send-Q is data not yet ACKed by the peer. A growing value means the receiver is slow (advertising a zero or tiny window because its app isn't reading), or the path is losing packets.
Diagnose →
ss -tni dst <client-ip> # check snd_wnd / rcv_space / retrans / rto
sudo tcpdump -ni eth0 host <client-ip> -c 50 | grep -E 'win 0|win [0-9]{1,3},'
win 0 from the client = zero window (receiver problem). Retransmits with a normal window = network loss.
Fix → Fix the slow consumer on the client side, or apply per-connection write timeouts on the server so one slow client can't tie up a worker (nginx send_timeout, app-level write deadlines).
Prevent → Use non-blocking writes with deadlines, and protect against slow readers with timeouts at the proxy layer.
More on Sockets, ports, TIME_WAIT and conntrack
`dmesg` is full of `nf_conntrack: nf_conntrack: table full, dropping packet` and new connections randomly time out.Intermediate`ss -s` on a reverse proxy shows 40,000 sockets in `TIME_WAIT`. Is that a problem?BeginnerAn app server's `CLOSE_WAIT` count grows steadily until the service logs `Too many open files`.IntermediateLogs show `accept4(): Too many open files` and the service stops accepting connections.Beginner`dmesg` shows `TCP: request_sock_TCP: Possible SYN flooding on port 443. Sending cookies.`Intermediate`ss -ltn` shows the listener for port 8080 with `Recv-Q 129` and `Send-Q 128`, and clients hang on connect.Advanced