Skip to content

Commit

Permalink
add configoption for pm=ondemand
Browse files Browse the repository at this point in the history
  • Loading branch information
derkgort committed Dec 23, 2016
1 parent 430de90 commit 81a4425
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/fpm/pool.pp
Expand Up @@ -42,6 +42,8 @@
#
# [*pm_max_requests*]
#
# [*pm_process_idle_timeout*]
#
# [*pm_status_path*]
#
# [*ping_path*]
Expand Down Expand Up @@ -128,6 +130,7 @@
$pm_min_spare_servers = '5',
$pm_max_spare_servers = '35',
$pm_max_requests = '0',
$pm_process_idle_timeout = '10s',
$pm_status_path = undef,
$ping_path = undef,
$ping_response = 'pong',
Expand Down
11 changes: 11 additions & 0 deletions templates/fpm/pool.conf.erb
Expand Up @@ -63,6 +63,12 @@ group = <%= @group_final %>
; state (waiting to process). If the number
; of 'idle' processes is greater than this
; number then some children will be killed.
; ondemand - no children are created at startup. Children will be forked when
; new requests will connect. The following parameter are used:
; pm.max_children - the maximum number of children that
; can be alive at the same time.
; pm.process_idle_timeout - The number of seconds after which
; an idle process will be killed.
; Note: This value is mandatory.
pm = <%= @pm %>

Expand Down Expand Up @@ -91,6 +97,11 @@ pm.min_spare_servers = <%= @pm_min_spare_servers %>
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = <%= @pm_max_spare_servers %>

; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s
pm.process_idle_timeout = <%= @pm_process_idle_timeout %>

; 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.
Expand Down

0 comments on commit 81a4425

Please sign in to comment.