PHP-FPM webgui crashes and freezes
Regarding PHP-FPM, webgui crashes and freezes when the system load is relatively heavy, such as when there are a large number of BGP routes.
You have to execute the Restart PHP-FPM command to restart the webgui to resume its work.
I've set PHP memory limit in 1024MiB, but still doesn't solve the problem
I initially found the reason. The parameters in php-fpm.conf are incorrect and cannot adapt to high load conditions.
The modified new configuration parameters have obvious mitigating effect.
i will the conf changed:
From old config
pm.max_children = 8
pm.start_servers = 2
pm.max_requests = 5000
to NEW config:
pm.max_children = 16
pm.start_servers = 4
pm.max_requests = 1000
request_terminate_timeout = 1800
built on Thu Oct 5 14:00:00 CST 2023
Updated by Jim Pingle 5 months ago
- Status changed from New to Rejected
- Priority changed from High to Normal
Those parameters are already adjusted based on system memory. There have been no other similar reports of problems with high load systems, it is possible you have some other isolated issue on your own system that is contributing, or your hardware/RAM may be undersized for what you are attempting to do on that system.
Post on the forum for assistance before opening a Redmine for these issues, not everything is a bug.
No, according to research, it is caused by your parameter configuration and PHP code design issues. My hardware resources are sufficient and only 20% of the memory is used.It doesn’t mean that it’s not a bug just because you haven’t encountered it. The router must consider the situation under heavy load.It can't be considered as a toy. It needs to be more professional.
I read some information and experience and tried it. My point is not to rule out any possibility, but to face the problem and solve it.
What is observed so far is that when the load increases, php-fpm will go to CPU100%. It does not start more php-fpm processes to share the load. It causes the CPU of 1-2 processes to be 100%, so it is easy to cause the web to crash. I also refer to other people's experience sharing to analyze and try. Although I am not a technical developer, when I encounter problems, I don't avoid them, but find the reasons and try to solve them.