Php-fpm requests eventually goes to queue !!

shahzaib shahzaib shahzaib.cb at gmail.com
Thu May 22 08:24:31 UTC 2014


These are the new status for php-fpm now :

pool:                 stats
process manager:      dynamic
start time:           22/May/2014:12:17:39 +0500
start since:          3975
accepted conn:        866645
listen queue:         0
max listen queue:     2163
listen queue len:     65535
idle processes:       153
active processes:     2
total processes:      155
max active processes: 250
max children reached: 4





On Thu, May 22, 2014 at 12:37 PM, shahzaib shahzaib
<shahzaib.cb at gmail.com>wrote:

> Hello,
>
>      We're using nginx + php-fpm. Please check the following
> configurations in php-fpm and sysctl in order to handle large amount of
> php-fpm request, but still 1000+ requests are getting into queue every
> 15min.
>
> php-fpm.d/stats.conf
>
> [stats]
> listen = 127.0.0.1:9000
> user = apache
> group = apache
> request_slowlog_timeout = 5s
> slowlog = /var/log/php-fpm/stats-slow.log
> listen.allowed_clients = 127.0.0.1
> pm = dynamic
> pm.max_children = 250
> pm.start_servers = 40
> pm.min_spare_servers = 20
> pm.max_spare_servers = 40
> pm.max_requests = 40000
> listen.backlog = -1
> request_terminate_timeout = 300s
> rlimit_files = 13107200
> rlimit_core = unlimited
> env[HOSTNAME] = $HOSTNAME
> env[TMP] = /tmp
> env[TMPDIR] = /tmp
> env[TEMP] = /tmp
> pm.status_path = /status
>
> The main config parameters of sysctl.conf :
>
> vm.overcommit_memory = 1
> fs.file-max = 7000000
> net.ipv4.tcp_max_syn_backlog = 70000
> net.core.netdev_max_backlog = 4096
> net.core.somaxconn=65535
> net.ipv4.tcp_tw_reuse = 1
> net.ipv4.tcp_tw_recycle = 1
> net.ipv4.ip_local_port_range = 1024 65000
> net.ipv4.tcp_tw_reuse = 1
>
> /etc/security/limits.conf
> root soft nofile 700000
> root hard nofile 700000
>
>
> We've 72G of Ram and also writing on disk is 100+MB/s on Sas drives which
> makes high io util% most of the time.
>
> Any clue why requests are still getting into php-fpm  queue and max
> children also reached errors occuring, even max_children are 250 * 40000. ??
>
> Php-fpm status :
>
> pool:                 stats
> process manager:      dynamic
> start time:           22/May/2014:12:17:39 +0500
> start since:          1140
> accepted conn:        228244
> listen queue:         579
> max listen queue:     1970
> listen queue len:     65535
> idle processes:       167
> active processes:     9
> total processes:      176
> max active processes: 250
> max children reached: 1
>
>
>
> Regards.
> Shahzaib
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140522/e3998385/attachment-0001.html>


More information about the nginx mailing list