Submitted by 7stars on Tue, 05/16/2017 - 01:58
Hello, I don't know if already discussed but I don't think so.
1) pm.max_children
you set it to 9999
probably you confused this option with pm.max_requests
they are different.
If you set pm.max_children to 9999, on high load the server is unusable for sure or crash. A small botnet or some concurrents users crash the server.
So, I think you misunderstood with pm.max_requests
2) FPM control panel
it would be useful to control fpm from a control panel where you can set some variables like pm.variable, php_admin_value[var] indeed...
per domain with a dropdown and save options or something like that...
3) Server template for FPM
How do you set it at the moment? Seems not existing....
thank you
Status:
Fixed (pending)
Comments
Submitted by 7stars on Tue, 05/16/2017 - 01:59 Comment #1
Submitted by 7stars on Tue, 05/16/2017 - 03:08 Comment #2
Submitted by 7stars on Tue, 05/16/2017 - 03:11 Comment #3
Submitted by 7stars on Tue, 05/16/2017 - 03:12 Comment #4
Submitted by JamieCameron on Tue, 05/16/2017 - 14:29 Comment #5
1 - Known issue, will be fixed in the upcoming 5.99 Virtualmin release.
2 - There is no way (yet) to edit per-domain FPM settings, but we're working on it.
3 - Do you mean a template for the per-domain FPM config file?
Submitted by 7stars on Tue, 05/16/2017 - 15:11 Comment #6
3) server template for 2) FPM settings (pm.variable, php_admin_value[var]...)
eg. I want that
Template ONE has
pm.max_children = 4
pm......
php_admin_value[memory_limit] = 64M
...
...
Template TWO different than ONE and so on...
thank you
Submitted by 7stars on Tue, 05/16/2017 - 15:21 Comment #7
and also...
why on /etc/php-fpm.d
pools are named as 141341030325393.conf instead of eg. domain_name_pool.conf or something like that ?
this way is difficult to distinguish, you need to check the running processes sorted by user to understand what pool belongs to the user.
Submitted by JamieCameron on Tue, 05/16/2017 - 19:23 Comment #8
Ok, the template idea makes sense - I'll put this on our TODO list, as it's closely related to general editing of those
.conf
files.As to why the numeric names - this is intentional, as those are Virtualmin's internal domain IDs which never change even if the domain is renamed.
Submitted by aaronroydhouse on Mon, 04/26/2021 - 19:39 Comment #9
This is still and issue in 6.15. Just dealt with a server swamping with PHP-FPM child processes. The 'pm.max_children' is still set to 9999 by default in all PHP-FPM pools. The default is the sample PHP-FPM pool template is 'pm.max_children = 5'.
I can't see any global way to fix this, unless adding it to "Additional FPM pool options' will override the default pool setting? Or is there a template somewhere to edit? I can't find any setting for this at the per-site level either. Though you can 'manually edit config' under Services -> PHP-FPM options. Ideally there would get a sensible default value and a global way to change/limit that.
Have a look at this thread. Jamie just change the default to 20 -
https://forum.virtualmin.com/t/php-fpm-defaults-to-pm-max-children-9999-...