Optimize PHP pm setting to ondemand

The ondemand setting results in lower memory consumption in idle.
master
Erriez 3 years ago
parent 0fd97124f7
commit d0a0ba6727

@ -54,7 +54,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'.
@ -70,14 +70,27 @@ pm.max_children = 5
; 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
; This sets the maximum time in seconds a script is allowed to run before it is
; terminated by the parser. This helps prevent poorly written scripts from tying up
; the server. The default setting is 30s.
; Note: Used only when pm is set to 'ondemand'
pm.process_idle_timeout = 10s
; 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. Default value: 0.
; Noted: Used only when pm is set to 'ondemand'
pm.max_requests = 200

Loading…
Cancel
Save