PHP :: Bug #76323 :: FPM /status reports wrong number of listen queue len
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76323 FPM /status reports wrong number of listen queue len
Submitted: 2018-05-10 03:50 UTC Modified: -
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: china_nzf at 163 dot com Assigned:
Status: Open Package: FPM related
PHP Version: 7.0Git-2018-05-10 (Git) OS: CentOS release 6.9 (Final)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: china_nzf at 163 dot com
New email:
PHP Version: OS:

 

 [2018-05-10 03:50 UTC] china_nzf at 163 dot com
Description:
------------
When I first request php-fpm status page with command:
$ curl www.php-fpm.com/status

pool:                 www
process manager:      static
start time:           10/May/2018:11:36:11 +0800
start since:          2
accepted conn:        1
listen queue:         0
max listen queue:     0
listen queue len:     128
idle processes:       9
active processes:     1
total processes:      10
max active processes: 1
max children reached: 0
slow requests:        0

Then I set the pool to static with listen.backlog to 256, reloading the fpm. I would expect the metric "listen queue len" to be 256. But still will have "listen queue len" report 128. 

$ sudo kill -USR2 $(cat /var/run/php-fpm.pid)
$ curl www.php-fpm.com/status

pool:                 www
process manager:      static
start time:           10/May/2018:11:40:11 +0800
start since:          1
accepted conn:        1
listen queue:         0
max listen queue:     0
listen queue len:     128
idle processes:       9
active processes:     1
total processes:      10
max active processes: 1
max children reached: 0
slow requests:        0

I cat the somaxconn is 512
net.core.somaxconn:
$ cat /proc/sys/net/core/somaxconn
512

Pool configuration:
$ grep -v ";" ~/php7/etc/php-fpm.d/www.conf | grep -Ev "^$"
[www]
user = fpm
group = fpm
listen = 127.0.0.1:9000
listen.backlog = 256
pm = static
pm.max_children = 10
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.max_requests = 500
pm.status_path = /status
slowlog = logs/$pool.log.slow
request_slowlog_timeout = 1
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

Finally, I want to know the details.

Expected result:
----------------
Metric "listen queue len" from /status should be 256.

Actual result:
--------------
Metric "listen queue len" from /status should is 128.

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Fri Aug 17 06:01:24 2018 UTC