Add nginx.php.fpm_process_count option

This commit is contained in:
Julian Rother 2022-12-04 01:06:25 +01:00
parent 7e86de7eea
commit 6c057142a2
No known key found for this signature in database
GPG key ID: 8F9B6AE9BAAE4899
2 changed files with 7 additions and 1 deletions

View file

@ -151,6 +151,8 @@ data: {}
**phpconfig**: **phpconfig**:
``` ```
# If set, fpm forks exactly the number of worker processes specified (pm=static, pm.max_children=COUNT)
fpm_process_count: 5
ini: ini:
post_max_size: 64M post_max_size: 64M
upload_max_filesize: 64M upload_max_filesize: 64M

View file

@ -99,7 +99,11 @@ listen.group = www-data
; pm.process_idle_timeout - The number of seconds after which ; pm.process_idle_timeout - The number of seconds after which
; an idle process will be killed. ; an idle process will be killed.
; Note: This value is mandatory. ; Note: This value is mandatory.
{% if nginx.php.fpm_process_count|d(False) %}
pm = static
{% else %}
pm = dynamic pm = dynamic
{% endif %}
; The number of child processes to be created when pm is set to 'static' and the ; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
@ -110,7 +114,7 @@ pm = dynamic
; forget to tweak pm.* to fit your needs. ; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory. ; Note: This value is mandatory.
pm.max_children = 50 pm.max_children = {{ nginx.php.fpm_process_count|d(50) }}
; The number of child processes created on startup. ; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic' ; Note: Used only when pm is set to 'dynamic'