There are 4 fields in fastcgi configuration, max-procs, max-load-per-proc, PHP_FCGI_CHILDREN,PHP_FCGI_MAX_REQUESTS :
fastcgi.server = ( ".php" =>
(( "socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/bin/php",
"max-procs" => "2",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "3",
"PHP_FCGI_MAX_REQUESTS" => "10000" )
))
)
- Since there is only 1 entry in fastcgi.server, there will be 1 Fastcgi backend.
- Since PHP_FCGI_CHILDREN =3 and max-procs=2, the number of "/usr/local/bin/php" processes will be 2*(3+1)=7.
- Since max-procs=2, in the server status, there would be status of fastcgi.backend.0.0 and fastcgi.backend.0.1
So, there would be 1 fastcgi backend with 2 processes. These processes accept load.
I don't understand the following:
- What is the significance of PHP_FCGI_CHILDREN?
- Is a request handled by a PHP_FCGI_CHILDREN or by a proc?
- Which parameter decides the max-load of 1 proc? And what is its default value?
- Does the max-load of a proc have any relation with PHP_FCGI_MAX_REQUESTS?
- What would happen if PHP_FCGI_CHILDREN=0? It was mentioned that max-proc = number of watchers and max-proc*PHP_FCGI_CHILDREN= number of workers. What does that mean?
- When is a proc said to be overloaded?