On a client, `ss -tan state syn-sent` shows hundreds of connections to the same backend stuck there.
BeginnerTroubleshootingSockets, ports, TIME_WAIT and conntrack
Answer
Likely causes → The client sent SYNs and got nothing back: a firewall/security group drops them, the server is down, there's no return route, or the server's SYN queue is overflowing.
Diagnose →
ss -tan state syn-sent | awk '{print $4}' | sort | uniq -c
sudo tcpdump -ni eth0 'host <backend> and tcp[tcpflags] & (tcp-syn|tcp-rst) != 0'
nc -vz -w 3 <backend> <port>
Run the same tcpdump on the backend: SYNs not arriving = path/firewall; arriving but no SYN-ACK = server-side issue.
Fix → Open the port in the SG/firewall, fix routing, or fix the server backlog. Set sane connect timeouts in clients so they fail fast instead of piling up.
Prevent → Synthetic TCP checks to critical dependencies and connect-timeout metrics in the client.
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