php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81242 Unclear documentation for process management directives
Submitted: 2021-07-09 16:18 UTC Modified: -
From: chealer at gmail dot com Assigned:
Status: Open Package: FPM related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
18 + 36 = ?
Subscribe to this entry?

 
 [2021-07-09 16:18 UTC] chealer at gmail dot com
Description:
------------
The List of pool directives for PHP-FPM configuration at https://www.php.net/manual/en/install.fpm.configuration.php documents several process management directives. While the pm=static case seems fairly simple, the whole thing looks quite complicated. Unfortunately, neither the PHP manual nor the file comments are particularly clear, in particular for the following directives:


pm string
Choose how the process manager will control the number of child processes. Possible values: static, ondemand, dynamic. This option is mandatory.

static - the number of child processes is fixed (pm.max_children).

ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where pm.start_servers are started when the service is started.

dynamic - the number of child processes is set dynamically based on the following directives: pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.

pm.max_children int
The number of child processes to be created when pm is set to static and the maximum number of child processes to be created when pm is set to dynamic. This option is mandatory.

This option sets the limit on the number of simultaneous requests that will be served. Equivalent to the ApacheMaxClients directive with mpm_prefork and to the PHP_FCGI_CHILDREN environment variable in the original PHP FastCGI.

pm.start_servers int
The number of child processes created on startup. Used only when pm is set to dynamic. Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.

pm.min_spare_servers int
The desired minimum number of idle server processes. Used only when pm is set to dynamic. Also mandatory in this case.

pm.max_spare_servers int
The desired maximum number of idle server processes. Used only when pm is set to dynamic. Also mandatory in this case.



At least 2 things could greatly clarify:
1. Defining the effect of pm.min_spare_servers
2. Explaining the difference between child processes and server processes

Test script:
---------------
This does not report a behavioral bug.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2022-12-10 05:08 UTC] austinpatrick711 at gmail dot com
Thanks for sharing. I found a lot of interesting information here.


(https://www.mybkexperience.one/)php.net
 [2022-12-29 06:01 UTC] kimia dot smo9881 at gmail dot com
Thanks for sharing that. 

(https://www.runyourpool.net/)github.com
 [2022-12-31 08:48 UTC] James1986Howell at gmail dot com
Process documentation is an internal, living document that details the tasks and steps needed to launch a new process. Learn how to create a process document, as well as the benefits of implementing one on your team.


(https://www.paybyplatema.us/)github.com
 [2023-06-30 10:03 UTC] julia788maxwell at gmail dot com
good info
(https://github.com.php)(https://www.yourtexasbenefits.bid/)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 11:01:27 2024 UTC