Difference between revisions of "PHP pm"

From wikieduonline
Jump to navigation Jump to search
(Created page with " 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...")
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  cat /etc/php/7.*/fpm/pool.d/www.conf | grep pm | grep -v ";"
+
  cat [[/etc/php/]]7.*/fpm/pool.d/www.conf | grep pm | grep -v ";"
 
  listen = /run/php/php7.2-fpm.sock
 
  listen = /run/php/php7.2-fpm.sock
  pm = dynamic
+
  pm = [[dynamic]]
  pm.max_children = 8
+
  [[pm.max_children]] = 8
 
  pm.start_servers = 2
 
  pm.start_servers = 2
 
  pm.min_spare_servers = 1
 
  pm.min_spare_servers = 1
 
  pm.max_spare_servers = 3
 
  pm.max_spare_servers = 3
  
 +
;pm.process_idle_timeout = 10s;
 +
;[[pm.max_requests]] = 500                  # Default 0
 +
;pm.status_path = /status
 +
 +
<pre>
 +
; 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.
 +
</pre>
 +
 +
== 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 ==
 
== See also ==
 +
* {{PHP-fpm}}
 
* {{PHP}}
 
* {{PHP}}
 +
 +
[[Category:PHP]]

Latest revision as of 06:38, 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                   # Default 0
;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[edit]

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[edit]

Advertising: