diff options
author | Jérôme Loyet <fat@php.net> | 2010-08-31 09:33:53 +0000 |
---|---|---|
committer | Jérôme Loyet <fat@php.net> | 2010-08-31 09:33:53 +0000 |
commit | 0605d5f309dc55642e6e4d1ef750bcd8a25afcc5 (patch) | |
tree | 5046888092117cb358b43ce5567990fc93f0ae97 /sapi | |
parent | c0840f18f3370cc2c62b8ca9295af1e0e5478506 (diff) | |
download | php-git-0605d5f309dc55642e6e4d1ef750bcd8a25afcc5.tar.gz |
- Changed listen.backlog in the FPM configuration file to default to 128
instead of -1 (except on FreeBSD and OpenBSD). This is the same value
as the one used in the cgi sapi. This patch completes revision 302725.
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/fpm/fpm/fpm_conf.c | 2 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_sockets.h | 9 | ||||
-rw-r--r-- | sapi/fpm/php-fpm.conf.in | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 958f68b991..4c7e6d618c 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -322,7 +322,7 @@ static void *fpm_worker_pool_config_alloc() /* {{{ */ } memset(wp->config, 0, sizeof(struct fpm_worker_pool_config_s)); - wp->config->listen_backlog = -1; + wp->config->listen_backlog = FPM_BACKLOG_DEFAULT; if (!fpm_worker_all_pools) { fpm_worker_all_pools = wp; diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h index d9e283d5a3..8bd778ea50 100644 --- a/sapi/fpm/fpm/fpm_sockets.h +++ b/sapi/fpm/fpm/fpm_sockets.h @@ -10,6 +10,15 @@ #include "fpm_worker_pool.h" +/* + On FreeBSD and OpenBSD, backlog negative values are truncated to SOMAXCONN +*/ +#if (__FreeBSD__) || (__OpenBSD__) +#define FPM_BACKLOG_DEFAULT -1 +#else +#define FPM_BACKLOG_DEFAULT 128 +#endif + enum fpm_address_domain fpm_sockets_domain_from_address(char *addr); int fpm_sockets_init_main(); diff --git a/sapi/fpm/php-fpm.conf.in b/sapi/fpm/php-fpm.conf.in index 6a73047adc..ca45fb414c 100644 --- a/sapi/fpm/php-fpm.conf.in +++ b/sapi/fpm/php-fpm.conf.in @@ -75,7 +75,7 @@ listen = 127.0.0.1:9000 ; Set listen(2) backlog. A value of '-1' means unlimited. -; Default Value: -1 +; Default Value: 128 (-1 on FreeBSD and OpenBSD) ;listen.backlog = -1 ; List of ipv4 addresses of FastCGI clients which are allowed to connect. |