Merge pull request #1597 from ioannidesalex/patch-41

Vesta PHP-FPM Optimization
This commit is contained in:
Serghey Rodin 2018-06-01 15:44:32 +03:00 committed by GitHub
commit c7d84e7b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,18 +42,18 @@ pid = /var/run/vesta-php.pid
; instances running on the same server, you can change the default value ; instances running on the same server, you can change the default value
; which must suit common needs. ; which must suit common needs.
; Default Value: php-fpm ; Default Value: php-fpm
;syslog.ident = php-fpm syslog.ident = vesta-php
; Log level ; Log level
; Possible Values: alert, error, warning, notice, debug ; Possible Values: alert, error, warning, notice, debug
; Default Value: notice ; Default Value: notice
;log_level = notice log_level = error
; If this number of child processes exit with SIGSEGV or SIGBUS within the time ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value ; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'. ; of '0' means 'Off'.
; Default Value: 0 ; Default Value: 0
;emergency_restart_threshold = 0 emergency_restart_threshold = 10
; Interval of time used by emergency_restart_interval to determine when ; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around ; a graceful restart will be initiated. This can be useful to work around
@ -61,13 +61,13 @@ pid = /var/run/vesta-php.pid
; Available Units: s(econds), m(inutes), h(ours), or d(ays) ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds ; Default Unit: seconds
; Default Value: 0 ; Default Value: 0
;emergency_restart_interval = 0 emergency_restart_interval = 1m
; Time limit for child processes to wait for a reaction on signals from master. ; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays) ; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds ; Default Unit: seconds
; Default Value: 0 ; Default Value: 0
;process_control_timeout = 0 process_control_timeout = 10s
; The maximum number of processes FPM will fork. This has been design to control ; The maximum number of processes FPM will fork. This has been design to control
; the global number of processes when using dynamic PM within a lot of pools. ; the global number of processes when using dynamic PM within a lot of pools.
@ -97,7 +97,7 @@ pid = /var/run/vesta-php.pid
; - /dev/poll (Solaris >= 7) ; - /dev/poll (Solaris >= 7)
; - port (Solaris >= 10) ; - port (Solaris >= 10)
; Default Value: not set (auto detection) ; Default Value: not set (auto detection)
; events.mechanism = epoll events.mechanism = epoll
;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ; ; Pool Definitions ;
@ -188,7 +188,7 @@ listen.mode = 0660
; 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.
pm = dynamic pm = ondemand
; 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'.
@ -199,33 +199,33 @@ 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 = 5 pm.max_children = 2
; 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'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
pm.start_servers = 2 ;pm.start_servers = 2
; The desired minimum number of idle server processes. ; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic' ; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 1 ;pm.min_spare_servers = 1
; The desired maximum number of idle server processes. ; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic' ; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 3 ;pm.max_spare_servers = 3
; The number of seconds after which an idle process will be killed. ; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand' ; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s ; Default Value: 10s
;pm.process_idle_timeout = 10s; pm.process_idle_timeout = 10s;
; The number of requests each child process should execute before respawning. ; 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 ; 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. ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0 ; Default Value: 0
;pm.max_requests = 500 pm.max_requests = 1000
; The URI to view the FPM status page. If this value is not set, no URI will be ; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. It shows the following informations: ; recognized as a status page. It shows the following informations: