Open PLTytus opened 1 day ago
We might need a bit more to understand if the issue is relevant, i.e. configuration, how the logs look ...
This is in /usr/local/etc/php-fpm.d/www.conf
on php:8.4.1-fpm-alpine
image
[www]
user = www-data
group = www-data
pm = dynamic
pm.max_children = 200
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 20
pm.max_requests = 200
pm.status_listen = 127.0.0.1:9001
pm.status_path = /fpmstatus
No errors in logs.
It kind of behaves like processes are overriding current stats: https://github.com/user-attachments/assets/61aab54b-2d25-45c7-b0d7-7562b8aaef2b
There is no such issue on PHP 8.3
Possibly this PR https://github.com/php/php-src/pull/14153
This is calling FPM_SCOREBOARD_ACTION_SET at the end of the request with all stats set to 0, the unmodified stats should be set as -1
so either don't set the values
--- fpm_scoreboard_update_commit(0, 0, 0, 0, 0, 0, 0, proc->memory, FPM_SCOREBOARD_ACTION_SET, NULL);
+++ fpm_scoreboard_update_commit(-1, -1, -1, -1, -1, -1, -1, proc->memory, FPM_SCOREBOARD_ACTION_SET, NULL);
or INC vs SET
--- fpm_scoreboard_update_commit(0, 0, 0, 0, 0, 0, 0, proc->memory, FPM_SCOREBOARD_ACTION_SET, NULL);
+++ fpm_scoreboard_update_commit(0, 0, 0, 0, 0, 0, 0, proc->memory, FPM_SCOREBOARD_ACTION_INC, NULL);
Looking at fpm_scoreboard_update_commit
definition, both @lucasnetau suggested solutions should resolve the issue.
https://github.com/php/php-src/blob/afa08b509ed44cb30fbbab6b2bff2d0460ab395a/sapi/fpm/fpm/fpm_scoreboard.c#L100-L177
Description
fpmstatus seems to return wrong values, sample
accepted conn
not incresing, even decreasing, e.g. shows 3 after refreshing it shows 1 againidle processes
,active processes
,idle processes
: in this example there 15 running fpm processes in totalPHP Version
8.4.1
Operating System
No response