From 079c77c75f21434e3f7fcef46e70babb3f47d6f5 Mon Sep 17 00:00:00 2001 From: Augusto Bennemann Date: Mon, 19 Aug 2024 14:00:00 -0300 Subject: [PATCH] Allow overriding 'pm' in PHP-FPM's pool config --- roles/wordpress-setup/defaults/main.yml | 1 + roles/wordpress-setup/templates/php-fpm-pool-wordpress.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/wordpress-setup/defaults/main.yml b/roles/wordpress-setup/defaults/main.yml index 77140141d4..e654f59aa7 100644 --- a/roles/wordpress-setup/defaults/main.yml +++ b/roles/wordpress-setup/defaults/main.yml @@ -49,6 +49,7 @@ robots_tag_header: "{{ item.value.robots_tag_header | default({}) }}" robots_tag_header_enabled: "{{ robots_tag_header.enabled | default(not_prod) }}" # PHP FPM +php_fpm_pm: 'dynamic' php_fpm_pm_max_children: 10 php_fpm_pm_start_servers: 1 php_fpm_pm_min_spare_servers: 1 diff --git a/roles/wordpress-setup/templates/php-fpm-pool-wordpress.conf.j2 b/roles/wordpress-setup/templates/php-fpm-pool-wordpress.conf.j2 index 1464745633..46699c9291 100644 --- a/roles/wordpress-setup/templates/php-fpm-pool-wordpress.conf.j2 +++ b/roles/wordpress-setup/templates/php-fpm-pool-wordpress.conf.j2 @@ -6,7 +6,7 @@ listen.owner = www-data listen.group = www-data user = {{ web_user }} group = {{ web_group }} -pm = dynamic +pm = {{ php_fpm_pm }} pm.max_children = {{ php_fpm_pm_max_children }} pm.start_servers = {{ php_fpm_pm_start_servers }} pm.min_spare_servers = {{ php_fpm_pm_min_spare_servers }}