summaryrefslogtreecommitdiff
path: root/sapi/tux/php_tux.c
diff options
context:
space:
mode:
authorrenyongquan <renyongquan@360.cn>2014-07-22 16:16:22 +0800
committerrenyongquan <renyongquan@360.cn>2014-07-22 16:16:22 +0800
commitebf4ffc9354f316f19c839a114b26a564033708a (patch)
treeeb443f91fc2a527f95e95da546f3719c8c9e3e6d /sapi/tux/php_tux.c
parentb39f98cf81cce1eae9f665a5c7f82c93e218a577 (diff)
downloadphp-git-ebf4ffc9354f316f19c839a114b26a564033708a.tar.gz
Set FPM_BACKLOG_DEFAULT to 511
It is too large for php-fpm to set the listen backlog to 65535. It is realy NOT a good idea to clog the accept queue especially when the client or nginx has a timeout for this connection. Assume that the php-fpm qps is 5000. It will take 13s to completely consume the 65535 backloged connections. The connection maybe already have been closed cause of timeout of nginx or clients. So when we accept the 65535th socket, we get a broken pipe. Even worse, if hundreds of php-fpm processes get a closed connection they are just wasting time and resouces to run a heavy task and finally get error when writing to the closed connection(error: Broken Pipe). The really max accept queue size will be backlog+1(ie, 512 here). We take 511 which is the same as nginx and redis.
Diffstat (limited to 'sapi/tux/php_tux.c')
0 files changed, 0 insertions, 0 deletions