Page tree
Skip to end of metadata
Go to start of metadata

On Linux systems, a kernel configuration parameter called SOMAXCONN provides an upper limit on the value of the backlog parameter passed to the listen function (and therefore on the ListenBacklog Apache configuration parameter) that is used to create the server's listening socket. Values that exceed this kernel limit will be silently reduced to the kernel limit. Thus setting the backlog parameter to values greater than the SOMAXCONN value will achieve nothing other than extra confusion!

To check the kernel SOMAXCONN limit on Linux systems, use the following command:

 

> cat /proc/sys/net/core/somaxconn

 

or

 

> sysctl -n net.core.somaxconn


On many systems, the default value is 128 - too low for robust handling of new connections on a heavily loaded server! We recommend increasing this value to at least 1024 on server hosts. This can be done using the sysctl command, but it must be done by a super-user.

 

> sysctl -w net.core.somaxconn=1024

 

  • No labels