SOMAXCONN
somaxconn is a kernel parameter that controls the maximum length of the listen backlog for TCP sockets on many Unix-like systems, notably Linux. The backlog represents the queue of pending connections that have completed the TCP three-way handshake (or are in progress) and are waiting to be accepted by the application.
When a program calls listen(fd, backlog), the kernel enforces a cap: the effective backlog is the minimum
In Linux, somaxconn is accessible at /proc/sys/net/core/somaxconn and can be changed at runtime using sysctl net.core.somaxconn
There is also a separate parameter that affects the queue of incomplete connections in the TCP stack:
Impact and considerations: Raising somaxconn can help servers tolerate bursts of connection attempts by increasing the
See also: listen backlog, net.core.somaxconn, tcp_max_syn_backlog, SOMAXCONN.