-
Notifications
You must be signed in to change notification settings - Fork 7.9k
PHP-FPM on 8.2 seems to spawn many children without any corresponding requests #11707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Why do you have |
This configuration has not changed in months or even years at this point. But we'll give your suggestion a go next week. However the behaviour we see in our logs has drastically changed recently so I'm not super hopeful this is the culprit. |
It might also depend on traffic but hard to say from the provided logs. If you do not see it disappear, please enable debug log level in master fpm config and provide data from it. |
@bukka we've only enabled the debug logging at the moment, the attached partial log file is from a task running at >50% CPU (which for us is unusual, all our other tasks run at around 30%). And this will go up to 100% over the day. I personally don't see anything obviously wrong here, except that the children are spawning and exiting. We'll experiment with the the |
Might be worth turning on |
This excerpt seems to be where the issue starts appearing, there is a clear pattern at the start of the file (which is consistent all the way to the start of the full log) that's broken later on in the file (around line 80). |
We've removed the |
@bukka we haven't observed the issue since we set |
Yeah I thought that it will be the reason. Did you have this config before switching for such low value of |
I honestly don't know why it was set to such a low value (git history is also not helpful unfortunately), but we've had this config for years and haven't really had any issues with it. |
You should be able to see it from access logs if you log pid ( Currently I don't see any issue here so I will close this but if you notice anything specific that does not look right, please report it here with all the details and if it's an issue, I will be happy to re-open this and investigate further. |
Description
Since we switched our production backend to php 8.2 on 22-06-2023 we've observed a consistently higher load on our tasks. We run on AWS fargate with a slightly modified docker image based on the official php:8.2-fpm-bullseye image. The php-fpm processes sit behind an nginx server.
We observe that every day before traffic really gets busy one or two of our tasks starts using up 100% CPU. The logs for those tasks indicate that they are starting and stopping new children continuously even if there doesn't seem to be a request associated with it (we use a canonical log line so each request should have at least one application log line but we don't see those next to the children starting).
Here is an excerpt of our logs logs-insights-results-13.csv
And here is our current php-fpm configuration: www_pool.txt
We've only observed this behavior in production so far. If there is anything we can do to debug this further please let us know.
PHP Version
PHP 8.2
Operating System
debian bullseye
The text was updated successfully, but these errors were encountered: