summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2013-10-27 22:54:47 +0400
committerAntony Dovgal <tony2001@php.net>2013-10-27 22:54:47 +0400
commit9765763413526d641b98c0a1e40d57b5ba1cceb3 (patch)
treee260281bf0c9b7108fd6fd7a2d5c8a6302d36bcd
parent70c3a722e2561cb33d408f3c65e58f9468d2f667 (diff)
downloadphp-git-9765763413526d641b98c0a1e40d57b5ba1cceb3.tar.gz
increase backlog to the highest value everywhere
It makes no sense to use -1 for *BSD (which is the highest value there) and still use 128 for Linux. Lets raise it right to up the limit and let the people lower it if they think that 3.5Mb is too much for a process. IMO this is better than silently dropping connections.
-rw-r--r--sapi/fpm/fpm/fpm_sockets.h2
-rw-r--r--sapi/fpm/php-fpm.conf.in4
2 files changed, 3 insertions, 3 deletions
diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h
index cce5712b8c..121c016a7b 100644
--- a/sapi/fpm/fpm/fpm_sockets.h
+++ b/sapi/fpm/fpm/fpm_sockets.h
@@ -19,7 +19,7 @@
#if (__FreeBSD__) || (__OpenBSD__)
#define FPM_BACKLOG_DEFAULT -1
#else
-#define FPM_BACKLOG_DEFAULT 128
+#define FPM_BACKLOG_DEFAULT 65535
#endif
enum fpm_address_domain fpm_sockets_domain_from_address(char *addr);
diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in
index af4f2fa325..9002a2933b 100644
--- a/sapi/fpm/php-fpm.conf.in
+++ b/sapi/fpm/php-fpm.conf.in
@@ -159,8 +159,8 @@ group = @php_fpm_group@
listen = 127.0.0.1:9000
; Set listen(2) backlog.
-; Default Value: 128 (-1 on FreeBSD and OpenBSD)
-;listen.backlog = 128
+; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = 65535
; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many