What does `net.core.somaxconn` control?
IntermediateProductionLogs, Limits & High-Traffic Tuning
Answer
The maximum length of a listening socket's accept queue (fully established connections waiting for the app to accept()). The app's listen(backlog) is capped at this value. Default is 4096 on kernels 5.4+ (128 before). When it overflows, the kernel drops connections; nstat -az TcpExtListenOverflows and ss -lnt (Recv-Q vs Send-Q on LISTEN sockets) show it. Raise both the sysctl and the app's backlog (nginx listen 443 backlog=8192).
More on Logs, Limits & High-Traffic Tuning
How does log management work on a modern Linux server?BeginnerWhy centralize logs instead of reading them on each server?BeginnerWrite a logrotate config for an application log.BeginnerWhat is the difference between `copytruncate` and `create` + postrotate signal?IntermediateLogs rotated but disk usage did not drop. Why?IntermediateHow often does logrotate run, and why does `maxsize` sometimes not trigger in time?Intermediate