Default pm.start_servers too low in php-fpm when changing versions

SYSTEM INFORMATION
OS type and version Rocky Linux 9.5
Virtualmin version 7.30.4

When changing php-fpm version, the generated /etc/opt/remi/php83/php-fpm.d/nnnn.conf (or other php versions - same for e.g. 8.4) is setting pm.start_servers too low.

pm.max_children = 16
pm.start_servers = 2 ← Is too low - can’t be less than min_spare_servers or php-fpm throws an error
pm.min_spare_servers = 5
pm.max_spare_servers = 8

The config looks like this:
php_fpm=pm = dynamic pm.start_servers = 5 # Number of processes to start initially pm.min_spare_servers = 5 # Minimum idle processes pm.max_spare_servers = 10 # Maximum idle processes pm.max_children = 50 # Max simultaneous processes

But it still keeps setting the start_servers to 2 when changing php-fpm version.

Where can I change the defaults?

In the template

I thought so as well, but this is being ignored.

I thought I saw a bug that got fixed about the settings. See if I can find it.

found this but its spare server

so file is not getting updated?
Also its a template for new servers.

It updates it, but always defaults pm.start_servers=2 which is too low - I have to update it manually to 5 since the php-fpm server fails to restart.

try creating a new server like example.com and see if it works, maybe a bug if not.

When creating a new server it sets it correct
image
And on that I can change it as well without issue.

Maybe the issue with the existing server has to do with them being imported from an old server.

You could try disabling php on the virtual server and re-enabling (that may copy the template settings), or is that how your doing it now?

1 Like

Disabling php-fpm and re-enabling it solves the issue. I think it was related to the import, and possibly the php version may not have all been installed at the time of import.

Regardless - this works. Easy solution. Thank you!

1 Like