From 6f938175e0c8e620cf22ed76534079bffb32c73d Mon Sep 17 00:00:00 2001 From: Sebastian Marcet Date: Tue, 25 Oct 2016 10:28:51 -0300 Subject: [PATCH] PHP www pool tunning ( http 503 ) In order to avoid http 503 errors and taking a look at php fpm logs , its has been increased the start_servers, min_spare_servers and max_spare_servers values to avoid erros like WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers). Change-Id: I5d47625ac4702c1b6704c66967d76fac2a895907 --- files/www.conf | 7 ++++--- templates/vhost.erb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/files/www.conf b/files/www.conf index 7bfe8da..df3378a 100644 --- a/files/www.conf +++ b/files/www.conf @@ -11,17 +11,18 @@ pm = dynamic # the maximum number of children that can be alive at the same time. pm.max_children = 500 # the number of children created on startup. -pm.start_servers = 20 +# pm.start_servers = min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +pm.start_servers = 120 # the minimum number of children in 'idle' # state (waiting to process). If the number # of 'idle' processes is less than this # number then some children will be created. -pm.min_spare_servers = 10 +pm.min_spare_servers = 80 # the maximum number of children in 'idle' # state (waiting to process). If the number # of 'idle' processes is greater than this # number then some children will be killed. -pm.max_spare_servers = 20 +pm.max_spare_servers = 160 pm.max_requests = 500 chdir = / diff --git a/templates/vhost.erb b/templates/vhost.erb index 07045e7..89effc5 100644 --- a/templates/vhost.erb +++ b/templates/vhost.erb @@ -46,7 +46,7 @@ - ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000<%= @docroot %>/$1 + ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000<%= @docroot %>/$1 retry=0