Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-assisted implementation, testing and drafting.
A worker serving several FastCGI requests on one connection increments FPM's active count for every request, but only returns to idle when it accepts another connection. The status page can therefore report more active and total processes than actual workers.
I've changed the counter updates to use the worker's existing request stage. Moving to idle or active updates those counts once per transition, while every request still increments
accepted conn. The new PHPT checks fresh and persistent connections, the actual worker PID, active/idle/total and peak counts, and request totals.On Linux x86-64 under WSL2, the regression fails on the unmodified PHP-8.4 base
d8e34952and PHP 8.6.0, and passes with this change on both. The PHP 8.4 FPM suite passed 133 runnable tests, with 15 skips. On PHP 8.6.0, 147 tests passed and 13 skipped; the one failure is the separate OPcache map-pointer regression for GH-23859, which also fails on the unmodified release. A private FPM probe passed worker-state checks under static, dynamic and ondemand managers. Withpm.max_requests=5, both keepalive and fresh connections still returned five responses per worker across 30 responses.I also checked four concurrent, reused connections on both patched builds. The status showed four active workers while all four were busy and four idle workers after they finished. With
pm.max_requests=2, each worker still served two responses before recycling, across 12 requests.This addresses the reproducible status-count case in #14212. I know #19191 is also open; this patch changes only the FPM scoreboard updates and leaves the FastCGI callback API alone. I haven't reproduced the original 1,500-worker workload. Native Windows, ZTS and 32-bit checks are covered by the PR's CI rather than my WSL runs.