Bug #76323 [Opn]: FPM /status reports wrong number of listen queue len

From: Date: Sun, 30 Oct 2022 20:28:12 +0000
Subject: Bug #76323 [Opn]: FPM /status reports wrong number of listen queue len
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242710@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76323&edit=1 ID: 76323 Updated by: bukka@php.net Reported by: china_nzf at 163 dot com Summary: FPM /status reports wrong number of listen queue len Status: Open Type: Bug Package: FPM related Operating System: CentOS release 6.9 (Final) PHP Version: 7.0Git-2018-05-10 (Git) -Assigned To: +Assigned To: bukka Block user comment: N Private report: N New Comment: So after a look it uses tcpi_sacked from tcp_info struct on Linux so it doesn't exactly have to match /proc/sys/net/core/somaxconn from what I understand. I will need to investigate if there's a better way to get it though. Previous Comments: ------------------------------------------------------------------------ [2018-05-10 03:50:58] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76323&edit=1

« previous php.bugs (#242710) next »