Domain transfer needs to adjust php-fpm values for available RAM

SYSTEM INFORMATION
OS type and version EL 10
Webmin version 2.621
Virtualmin version 8.01
Webserver version Apache

When doing a Transfer Virtual Server, the php-fpm values need to be adjusted to the target servers RAM.

Example.
Transfer from existing server which has 20Gb RAM, the domain has settings

pm.max_children = 20
pm.start_servers = 3
pm.max_spare_servers = 10

Those values are currently kept even to a server with only 1Gb RAM.

Creating a new Virtual Server on the 1Gb server creates values

pm.max_children = 2
pm.start_servers = 1
pm.max_spare_servers = 2

I know it’s extreme example going from 20Gb RAM to only 1Gb RAM, but it makes the point.

I don’t use Backup/Restore, but it would probably be the same.

1 Like

I’m not sure if templates will work on transfer, have you tried there?

No idea, I don’t have any adjustments in mine.

Do a system backup then look inside virtualmin.tar.gz, then probably in virtualmin_templates and see if you can see your custom settings.

1 Like

How did you go from 20GB of RAM to just 1GB, exactly?

1 Like

Quite easy.
Just create a 1Gb VPS for testing stuff.

It is an issue for me as I have gone from 1 x 20Gb to 2 x 8Gb servers which is where I noticed the problem, though I also know to check and fix it manually now.

Just thought somebody might want to know.

This doesn’t sound like a feasible scenario or something that would happen regularly.

The fix for you is to re-save the “PHP Options” page. I don’t think we should add any extra complexity to address such a niche issue.


Failed to save PHP options : The recommended number of PHP sub-processes should be between 1 and 10


Excellent. Virtualmin recommends a value that you should use. Try 2 for 1GB system.

My point was that re-save PHP-Options doesn’t fix it.

Perhaps a tad less “niche” and possibly overlooked, is that I had the same problem transferring from the 20Gb server to 2 x 8Gb servers.

To me, a bug is a bug. Old school I guess.

It is ultimately a niche case, and we cannot automatically adjust PHP options based on reduced RAM.

It would fix the issue if you changed the value to be within the recommended range, as the error message suggests.

It’s not really a bug, and “fixing” it might just create more issues. :slight_smile: