Skip to content

Commit

Permalink
Merge 58a2a27 into bced0bf
Browse files Browse the repository at this point in the history
  • Loading branch information
motivator committed Sep 26, 2020
2 parents bced0bf + 58a2a27 commit dc9ce77
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions manifests/fpm/pool.pp
Expand Up @@ -70,6 +70,10 @@
# [*template*]
# The template to use for the pool
#
# [*process.dumpable*]
# Allow PHP to create a coredump during a segfault. Must still set
# rlimit_core
#
# [*rlimit_files*]
#
# [*rlimit_core*]
Expand Down Expand Up @@ -148,6 +152,7 @@
$security_limit_extensions = undef,
$slowlog = "/var/log/php-fpm/${name}-slow.log",
$template = 'php/fpm/pool.conf.erb',
$process_dumpable = false,
$rlimit_files = undef,
$rlimit_core = undef,
$chroot = undef,
Expand All @@ -171,6 +176,12 @@
warning('You must include the php base class before using any php defined resources')
}

if ($php::globals::php_version != undef) {
$php_version_major = regsubst($php::globals::php_version, '^(\d+)\.(\d+)$','\1')
} else {
$php_version_major = 5
}

$pool = $title

# Hack-ish to default to user for group too
Expand Down
14 changes: 14 additions & 0 deletions templates/fpm/pool.conf.erb
Expand Up @@ -76,6 +76,20 @@ apparmor_hat = <%= @apparmor_hat %>
; Note: This value is mandatory.
pm = <%= @pm %>
<% if @php_version_major.to_i >= 7 -%>
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
; or group is differrent than the master process user. It allows to create process
; core dump and ptrace the process for the pool user.
; Default Value: no
<% if @process_dumpable -%>
process.dumpable = yes
<% else -%>
process.dumpable = no
<% end -%>
<% end -%>


; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes to be created when pm is set to 'dynamic'.
; This value sets the limit on the number of simultaneous requests that will be
Expand Down

0 comments on commit dc9ce77

Please sign in to comment.