From c7ef4afb7ec34c54db5b468341523f458e51d7a9 Mon Sep 17 00:00:00 2001
From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de>
Date: Thu, 8 Feb 2018 11:38:07 +0100
Subject: [PATCH] Create php-fpm processes on demand, not dynamic

---
 php-fpm/templates/pool.conf.j2 | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/php-fpm/templates/pool.conf.j2 b/php-fpm/templates/pool.conf.j2
index 2695e21..89e2870 100644
--- a/php-fpm/templates/pool.conf.j2
+++ b/php-fpm/templates/pool.conf.j2
@@ -7,8 +7,7 @@ listen = /run/php/{{ fpm_pool }}-fpm.sock
 listen.owner = {{ fpm_socket_user }}
 listen.group = {{ fpm_socket_group }}
 
-pm = dynamic
-pm.max_children = 5
-pm.start_servers = 2
-pm.min_spare_servers = 1
-pm.max_spare_servers = 3
+pm = ondemand
+pm.max_children = 10
+pm.process_idle_timeout = 10s
+pm.max_requests = 500
-- 
GitLab