Additional FPM pool options doesn't change my pool config

8 posts / 0 new
Last post
#1 Wed, 12/13/2017 - 23:38
Matth
Matth's picture

Additional FPM pool options doesn't change my pool config

Hello,

I want to adapt the default FPM config when creating a ne virtualhost for that purpose in

Server Templates > PHP options > Additional FPM pool options

I have added this config:

pm = ondemand
pm.max_children = 15
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
pm.max_requests = 200

But any new Vhost created is still and always getting the default config

pm = dynamic
pm.max_children = 9999
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5

Is there something else to do to have those options replace by my mine ?

Thanks for any input

Kind regards

Mon, 01/22/2018 - 23:18
Mon, 03/05/2018 - 06:52
ronijames
ronijames's picture

I really appreciate this post. I have been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thanks again top air rifle scope 2018

GOOD

Mon, 03/05/2018 - 08:16
atleast
atleast's picture

I think www.conf and virtual domain.conf parameters need to be changed manually. I only changed children, min/max servers and requests on www.conf under /etc/php-fpm.d and no changes on the domains 12345678.conf files. I have not found any clue anywhere if domain.conf files need any change as their default is 9999 children and 1,1,5

Tue, 05/08/2018 - 03:23
georges87
georges87's picture
Tue, 10/02/2018 - 04:51
kpendic

Math,

I've find out that only by adding settings in the end of file:

/etc/php/7.0/fpm/php-fpm.conf makes this permanent (and also reflect all hosts, and modifies all pool.d/xxx.conf files also) after fpm restarts..

You have to add it after pool declaration, like this

pool

Mon, 03/04/2019 - 05:18
inaitana

Somehow kpendic's solution doesn't seem to work for me, the pools fpm configurations don't get overridden.

I devised an alternative solution:

  1. Create your default configuration file, i.e.: /etc/php/7.0/fpm/pool.d/default.conf
  2. Put your desired default fpm configuration in the default file, i.e.:pm = ondemand
    pm.max_children = 5
    pm.process_idle_timeout = 10s;
  3. Have Virtualmin include your default file in new pool configuration files, adding the include in "Virtualmin > System Settings > Server Templates > Default Settings > PHP Options > Additional FPM pool options", i.e. "include = /etc/php/7.0/fpm/pool.d/default.conf"

For already existing domains, you can have Virtualmin regenerate the configuration file by changing the "PHP script execution mode" from FPM to anything else and then back to FPM. If you have to do it for multiple domains, I advise you to temporarily switch to the old webmin theme if you want to go 10x faster.

Mon, 05/06/2019 - 10:32 (Reply to #7)
keegantoh

Hi, I really like your idea and it's working. Thanks. I am also interested in regarding switching to old webmin theme would help. Would you mind elaborate on that?