Browse Source

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
Sebastian Marcet 2 years ago
parent
commit
6f938175e0
2 changed files with 5 additions and 4 deletions
  1. 4
    3
      files/www.conf
  2. 1
    1
      templates/vhost.erb

+ 4
- 3
files/www.conf View File

@@ -11,17 +11,18 @@ pm = dynamic
11 11
 # the maximum number of children that can be alive at the same time.
12 12
 pm.max_children = 500
13 13
 # the number of children created on startup.
14
-pm.start_servers = 20
14
+# pm.start_servers = min_spare_servers + (max_spare_servers - min_spare_servers) / 2
15
+pm.start_servers = 120
15 16
 # the minimum number of children in 'idle'
16 17
 # state (waiting to process). If the number
17 18
 # of 'idle' processes is less than this
18 19
 # number then some children will be created.
19
-pm.min_spare_servers = 10
20
+pm.min_spare_servers = 80
20 21
 # the maximum number of children in 'idle'
21 22
 # state (waiting to process). If the number
22 23
 # of 'idle' processes is greater than this
23 24
 # number then some children will be killed.
24
-pm.max_spare_servers = 20
25
+pm.max_spare_servers = 160
25 26
 pm.max_requests = 500
26 27
 
27 28
 chdir = /

+ 1
- 1
templates/vhost.erb View File

@@ -46,7 +46,7 @@
46 46
   </Directory>
47 47
 
48 48
   <IfModule mod_proxy_fcgi.c>
49
-      ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000<%= @docroot %>/$1
49
+      ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000<%= @docroot %>/$1 retry=0
50 50
   </IfModule>
51 51
 
52 52
   <IfModule mod_fastcgi.c>

Loading…
Cancel
Save