• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue PHP-FPM spawning too many processes

StayAllive

Basic Pleskian
I have set the following parameters on the plesk subscription:

pm.max_children = 1
pm = ondemand

However the FPM process is starting 8 threads when the load is asking for it... this doesn't seem right.

The default is pm.max_children = 5 and that will spawn a lot more than 8 processes (about 25 from a quick count but I would assume it could spawn about 40 which is 5 * 8).

It is a server with 8 cores, but this puzzles me a bit... is each Apache thread possibly able to spawn a fpm thread?

Hope someone here can tell me what's going on and how to keep the fpm process count in check.

Server: ‪Ubuntu 14.04.5 LTS‬
Plesk: Onyx Versie 17.8.11 Update #2
 
Nope, Apache cannot spawn FPM processes.

But there is an FPM master process ("php-fpm: master process") for every PHP version on the server. (and if at least one website has this php version assigned)
This will then spawn 1-x "php-fpm: pool" processes per website on your server, so yeah, you can have hundreds of them, each belonging to another website. (pool name and the user thei're running as, should tell you that these are for different sites though)
 
Yes, but the situation above is for a single website pool :) I know that every website has it's own. But I though the max_children directive would limit the amount of child processes in a pool but in my situation that number seems to be 8 times higher.
 
Back
Top