Browse Source

Add a setting to configure PHP FPM Process Manager (default is still dynamic)

Emmanuel Bouthenot 3 years ago
parent
commit
99ebe67123

+ 1 - 0
roles/webserver/defaults/main.yml

@@ -23,6 +23,7 @@ fpm_pool_count: 1
 fpm_user: 'www-data'
 fpm_group: 'www-data'
 # fpm_max_children ~= (total RAM - RAM used by other process) / (average amount of RAM used by a PHP process)
+fpm_pm: 'dynamic'
 fpm_start_servers: 2
 fpm_max_children: 5
 fpm_min_spare_servers: 1

+ 1 - 1
roles/webserver/templates/fpm/php-fpm-pools-legacy.conf.j2

@@ -108,7 +108,7 @@ listen.mode = 0660
 ;             pm.process_idle_timeout   - The number of seconds after which
 ;                                         an idle process will be killed.
 ; Note: This value is mandatory.
-pm = dynamic
+pm = {{ fpm_pm }}
 
 ; The number of child processes to be created when pm is set to 'static' and the
 ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.

+ 1 - 1
roles/webserver/templates/fpm/php5-fpm-pools.conf.j2

@@ -92,7 +92,7 @@ listen.mode = 0660
 ;             pm.process_idle_timeout   - The number of seconds after which
 ;                                         an idle process will be killed.
 ; Note: This value is mandatory.
-pm = dynamic
+pm = {{ fpm_pm }}
 
 ; The number of child processes to be created when pm is set to 'static' and the
 ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.