Increased number of active php-fpm children

Hi everyone,

currently, I’m trying to improve the app “Duplicate Finder”. It looks like my code works well, but the maintainer reported some issues on the CPU usage - it increases to 100% and spawns a new fpm child. I was able to observe this as well.

I’ve tried to find a solution for that by increasing the log level for php-fpm. The increased log level showed that the number of active children increased which makes the spawn quite reasonable. But I wasn’t able to find the reason why so many children are active.
By using xdebug profiling and strace I saw that a lot of work was done on the core. But not that a loop in my app exists or so.

As I’m quite new to debugging php in such depth, can anybody give me an advice how to start/continue debugging?

Thanks in advance


1 Like

Hey there, hope you are doing well…

Which environment are we talking about?

Which OS are you running?

Any cache server?

Any HA running?

Any LB Proxy running?

thanks, I’m fine and thank you for your response. Hope you are fine as well

It was replicated on two linux distros with NC 21.0.1 running on php-fpm 7.4, reversed by nginx. Files are stored locally and mariadb 10.3 or 10.5 are used as DB.
The local memory caching is none and distributed memory caching is either redis or none.

Neither HA nor LB proxying is in place.

The theming app requires an icon with the name img/<appid>.svg it turned out that this missing icon lead to the high CPU usage.