A UDP metrics collector loses data under load, and `netstat -su` shows `receive buffer errors` increasing.
IntermediateTroubleshootingSockets, ports, TIME_WAIT and conntrack
Answer
Likely causes → Packets arrive faster than the app reads them; the socket receive buffer fills and the kernel drops new datagrams. UDP gives no backpressure, so the sender never knows.
Diagnose →
netstat -su | grep -iE 'receive buffer errors|packet receive errors'
nstat -az UdpRcvbufErrors UdpInErrors
ss -uamn 'sport = :8125' # skmem: rb = buffer size, d = drops
sysctl net.core.rmem_max net.core.rmem_default
Fix → Raise the max and request a bigger buffer in the app (SO_RCVBUF), and read faster (more reader threads, SO_REUSEPORT to spread across sockets):
sudo sysctl -w net.core.rmem_max=26214400 net.core.rmem_default=8388608
Prevent → Alert on UdpRcvbufErrors; for data you can't lose, switch to TCP or a queue.
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