diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2016-03-30 16:17:17 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2016-04-18 04:29:28 -0400 |
commit | 71ed1912c761ce7f3b7eb6d1267d2ccc1fea9795 (patch) | |
tree | 083be1825d4e1ffda0ee700f7a624e9797a46c84 /doc/config | |
parent | a65c57a54812fa44a8e1b6e846f69ac6e314f5d1 (diff) | |
download | lighttpd-git-71ed1912c761ce7f3b7eb6d1267d2ccc1fea9795.tar.gz |
[config] server.listen-backlog option (fixes #1825, #2116)
See doc/config/lighttpd.conf for explanation of listen() backlog queue
Additionally, mod_fastcgi and mod_scgi backend servers can now also be
configured with separate listen-backlog settings per server
x-ref:
"add server.listen-backlog option instead of hard-coded value (128 * 8) for listen()"
https://redmine.lighttpd.net/issues/2116
"Don't disable backend when overloaded"
https://redmine.lighttpd.net/issues/1825
github:
Closes #50
Diffstat (limited to 'doc/config')
-rw-r--r-- | doc/config/lighttpd.conf | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf index 68cfea94..79122d7e 100644 --- a/doc/config/lighttpd.conf +++ b/doc/config/lighttpd.conf @@ -207,6 +207,35 @@ server.network-backend = "sendfile" server.max-fds = 2048 ## +## listen-backlog is the size of the listen() backlog queue requested when +## the lighttpd server ask the kernel to listen() on the provided network +## address. Clients attempting to connect() to the server enter the listen() +## backlog queue and wait for the lighttpd server to accept() the connection. +## +## The out-of-box default on many operating systems is 128 and is identified +## as SOMAXCONN. This can be tuned on many operating systems. (On Linux, +## cat /proc/sys/net/core/somaxconn) Requesting a size larger than operating +## system limit will be silently reduced to the limit by the operating system. +## +## When there are too many connection attempts waiting for the server to +## accept() new connections, the listen backlog queue fills and the kernel +## rejects additional connection attempts. This can be useful as an +## indication to an upstream load balancer that the server is busy, and +## possibly overloaded. In that case, configure a smaller limit for +## server.listen-backlog. On the other hand, configure a larger limit to be +## able to handle bursts of new connections, but only do so up to an amount +## that the server can keep up with responding in a reasonable amount of +## time. Otherwise, clients may abandon the connection attempts and the +## server will waste resources servicing abandoned connections. +## +## It is best to leave this setting at its default unless you have modelled +## your traffic and tested that changing this benefits your traffic patterns. +## +## Default: 1024 +## +#server.listen-backlog = 128 + +## ## Stat() call caching. ## ## lighttpd can utilize FAM/Gamin to cache stat call. |