From 7237e08475e05d508eecfbb5b3c446dedf442f2a Mon Sep 17 00:00:00 2001 From: Emilien Kenler Date: Fri, 7 Aug 2015 19:10:49 +0900 Subject: [PATCH] Add variables to configure a bit php --- defaults/main.yml | 6 ++++++ templates/www.conf | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index a2dba62..2bd2d13 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,3 +4,9 @@ php_custom_extensions: [] php_fpm_user: apache php_fpm_group: apache php_sessions_dir: "/tmp" + +php_pm_max_children: 50 +php_pm_start_servers: 5 +php_pm_min_spare_servers: 5 +php_pm_max_spare_servers: 35 +php_pm_max_requests: 0 diff --git a/templates/www.conf b/templates/www.conf index f12ae6b..d4f9c8b 100644 --- a/templates/www.conf +++ b/templates/www.conf @@ -67,28 +67,28 @@ pm = dynamic ; CGI. ; Note: Used when pm is set to either 'static' or 'dynamic' ; Note: This value is mandatory. -pm.max_children = 50 +pm.max_children = {{ php_pm_max_children }} ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 5 +pm.start_servers = {{ php_pm_start_servers }} ; The desired minimum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 5 +pm.min_spare_servers = {{ php_pm_min_spare_servers }} ; The desired maximum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 35 +pm.max_spare_servers = {{ php_pm_max_spare_servers }} ; The number of requests each child process should execute before respawning. ; This can be useful to work around memory leaks in 3rd party libraries. For ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. ; Default Value: 0 -;pm.max_requests = 500 +pm.max_requests = {{ php_pm_max_requests }} ; The URI to view the FPM status page. If this value is not set, no URI will be ; recognized as a status page. By default, the status page shows the following