Difference between revisions of "PHP pm"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
 
  pm.max_spare_servers = 3
 
  pm.max_spare_servers = 3
  
 +
;pm.process_idle_timeout = 10s;
 +
;pm.max_requests = 500
 +
;pm.status_path = /status
  
 
<pre>
 
<pre>

Revision as of 05:40, 23 September 2022

cat /etc/php/7.*/fpm/pool.d/www.conf | grep pm | grep -v ";"
listen = /run/php/php7.2-fpm.sock
pm = dynamic
pm.max_children = 8
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
;pm.process_idle_timeout = 10s;
;pm.max_requests = 500
;pm.status_path = /status
; Choose how the process manager will control the number of child processes.
; Possible Values: [ static | dynamic | ondemand ]
;   static  - a fixed number (pm.max_children) of child processes;
;   dynamic - the number of child processes are set dynamically based on the
;             following directives. With this process management, there will be
;             always at least 1 children.
;             pm.max_children      - the maximum number of children that can
;                                    be alive at the same time.
;             pm.start_servers     - the number of children created on startup.
;             pm.min_spare_servers - the minimum number of children in 'idle'
;                                    state (waiting to process). If the number
;                                    of 'idle' processes is less than this
;                                    number then some children will be created.
;             pm.max_spare_servers - the maximum number of children in 'idle'
;                                    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.

Related

zcat -f /var/log/php*
[04-Jul-2021 12:48:53] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

See also

Advertising: