Project

General

Profile

Actions

Bug #14847

closed

PHP-FPM webgui crashes and freezes

Added by yon Liu 10 months ago. Updated 10 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
PHP Interpreter
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Release Notes:
Default
Affected Plus Version:
Affected Architecture:
amd64

Description

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

Actions #1

Updated by yon Liu 10 months ago

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
pm.min_spare_servers=1
pm.max_spare_servers= 7

to NEW config:

pm.max_children = 16
pm.start_servers = 4
pm.max_requests = 1000
pm.min_spare_servers=4
pm.max_spare_servers= 16

request_terminate_timeout = 1800

tested on

23.09-DEVELOPMENT (amd64)
built on Thu Oct 5 14:00:00 CST 2023
FreeBSD 14.0-CURRENT

Actions #2

Updated by Jim Pingle 10 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.

Actions #3

Updated by yon Liu 10 months ago

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.

Actions #4

Updated by yon Liu 10 months ago

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.

https://www.seafog.cn/archives/204286538
https://www.cnblogs.com/boundless-sky/p/9223942.html

Actions

Also available in: Atom PDF