Open wirwolf opened 10 months ago
IIRC this CPU usage number in access logs is more relative to the whole usage so if you don't have almost any traffic, then it might be obviously high but can't really say without more info.
So to further investigate I will need a bit more details about your setup. Mainly following
Ideally if you could provide a helm chart or similar with everything in it so I can easily reproduce it, that would be perfect.
Hello @bukka. I create a test project with an example docker image and k8s resources https://github.com/wirwolf/php-bug-12600 How to use:
make k8s-deploy-app
From a quick look I think 60m limit on CPU might be just too low for FPM.
Considering that this has been always like this, it's not exactly a bug. We should look in to optimizing this so I will add this to my TODO list to look at later but will change it to the feature request.
I have got actually already note about integrating a proper health check similar to php-fpm-healthcheck (which is what you also use in your setup I see) which I think would be an optimal solution because using status is not really ideal.
Also, I use a status endpoint for grab metrics end is exported to cluster for hpa(for example scale when fpm uses max child) What solution do you suggest in my case?
Description
Hello, community. I am using php-fpm 8.2 in the docker container and running on the Kubernetes cluster. And after some time of observations, I see very strange behavior of my horizontal pod autoscaler. All the time, application is scaled to maximal pod count although there is no load or traffic at all. After investigating fpm logs I see that the status endpoint sometimes uses too match CPU.
And this is the reason why autoscaler detects an unusual load all the time. I also saw mentions of this problem in the comments to the bug: https://bugs.php.net/bug.php?id=80428 Please fix this strange phantom error.
Best regards
PHP Version
8.2
Operating System
alpine 3.12