trying to be frugal, on my new test 7.1 system I adjusted the PHP FCGId sub-processes item on the PHP Options panel to be 4. Then I was in for a surprise – the php-fpm process died – that is, during the shutdown/restart action, it did shut down but then failed to start back up !!
It says in the logfile /var/log/php-fpm/error.log
ALERT: [pool 155655479617843] pm.min_spare_servers(1) and pm.max_spare_servers(5) cannot be greater than pm.max_children(4)
I see in php-lib.pl, in the routine create_php_fpm_pool that some values are hardcoded:
@verne - there may well be somewhere in the GUI that you can set whatever “baseline” values you want, but I just set them manually in the files and the GUI doesn’t overwrite them - so the chance of the GUI crippling your system is NIL.
Yes, you are right – it was a bug and I think I have already fixed that. Where exactly did you make the change? If that was PHP Options page, it will be fixed in Virtualmin 7.2 release.
Bring up VirtualMin on port 10000 in a browser. Log in. Choose your domain in the VirtualMin pulldown menu.
Expand the Server Configuration item. Then choose PHP Options.
On that panel, when FPM is chosen (if you have a choice), there is the item
PHP FCGId sub-processes
adjust that to be 5 or more (or whatever you see for pm.max_spare_servers) – this value is used for pm.max_children for this domain. Then start php-fpm for 8.1 back up again. You will have to do this by hand for each new domain.
I have no idea how to fix the root cause (well, if you are very brave, you can edit the VirtualMin PL scripts/files – that is, how to make VirtualMin handle this issue). But you can adjust your Server Template for all future domains … in VirtualMin, expand the lower menu section System Settings. Then choose Server Templates.
Once there, choose Default Settings, or make a new custom one for yourself. Once you are viewing a Server Template, use the pulldown to choose PHP Options. Once on that panel, adjust
Default FCGId PHP sub-processes
to be 5 or more (or whatever you see for pm.max_spare_servers) – this value is used for pm.max_children for all new domains.