php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76003 FPM /status reports wrong number of active processes
Submitted: 2018-02-24 04:23 UTC Modified: 2022-04-07 14:07 UTC
Votes:7
Avg. Score:4.3 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:3 (60.0%)
From: enrico dot stahn at gmail dot com Assigned: bukka (profile)
Status: Closed Package: FPM related
PHP Version: 7.1.14 OS: Alpine
Private report: No CVE-ID: None
 [2018-02-24 04:23 UTC] enrico dot stahn at gmail dot com
Description:
------------
Having set the pool to static with max_children to 5 I would expect the metric "active processes" to be 5 or below. Sending 10 concurrent requests will have "active processes" report more than 5 (e.g. 10, 12, 25, ...).

Is this valid behaviour?


Pool configuration:

# grep -v ";" /usr/local/etc/php-fpm.d/www.conf | grep -Ev "^$"
[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
pm = static
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.process_idle_timeout = 10s
pm.max_requests = 500
pm.status_path = /status
ping.response = pong
slowlog = log/$pool.log.slow
request_slowlog_timeout = 0
request_terminate_timeout = 0

Expected result:
----------------
Metric "active processes" from /status should be below 5.

Actual result:
--------------
Metric "active processes" from /status is above 5.

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-06 03:59 UTC] enrico dot stahn at gmail dot com
Possibly related to https://bugs.php.net/bug.php?id=76109
 [2022-04-07 14:08 UTC] bukka@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 [2022-04-07 14:08 UTC] bukka@php.net
I can confirm that this is a bug and was able to recreate using following scripts:

https://github.com/bukka/php-util/tree/92a02d92914821bd194867360d563ed5a462a80f/tests/fpm/status-wrong-active-procs

I'm just looking to reason for that and hopefully will have a fix soon.
 [2022-04-11 17:07 UTC] bukka@php.net
The following pull request has been associated:

Patch Name: Fix bug #76003: FPM /status reports wrong number of active processe
On GitHub:  https://github.com/php/php-src/pull/8331
Patch:      https://github.com/php/php-src/pull/8331.patch
 [2022-04-12 22:16 UTC] git@php.net
Automatic comment on behalf of bukka
Revision: https://github.com/php/php-src/commit/33bb201b3eddbda0cc93c9cd1cb9adb4c77d0df2
Log: Fix bug #76003: FPM /status reports wrong number of active processe
 [2022-04-12 22:16 UTC] git@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC