Revision e59dd448
Added by Scott Ullrich almost 16 years ago
etc/inc/system.inc | ||
---|---|---|
722 | 722 |
if($captive_portal == true) { |
723 | 723 |
$bin_environment = <<<EOC |
724 | 724 |
"bin-environment" => ( |
725 |
"PHP_FCGI_CHILDREN" => "16",
|
|
726 |
"PHP_FCGI_MAX_REQUESTS" => "{$max_requests}"
|
|
725 |
"PHP_FCGI_CHILDREN" => "$max_procs",
|
|
726 |
"PHP_FCGI_MAX_REQUESTS" => "500"
|
|
727 | 727 |
), |
728 | 728 |
EOC; |
729 | 729 |
|
730 | 730 |
} else if ($avail > 0 and $avail < 128) { |
731 | 731 |
$bin_environment = <<<EOC |
732 | 732 |
"bin-environment" => ( |
733 |
"PHP_FCGI_CHILDREN" => "1", |
|
734 |
/* This problem seems to stem from a little-known issue with PHP: |
|
735 |
* PHP stops accepting new FastCGI connections after handling 500 requests; |
|
736 |
* unfortunately, there is a potential race condition during the PHP cleanup |
|
737 |
* code in which PHP can be shutting down but still have the socket open, so |
|
738 |
* lighty can send request number 501 to PHP and have it "accepted", but then |
|
739 |
* PHP appears to simply exit, causing a 500 return from lighty. |
|
740 |
*/ |
|
733 |
"PHP_FCGI_CHILDREN" => "$max_procs" |
|
741 | 734 |
"PHP_FCGI_MAX_REQUESTS" => "500", |
742 |
"PHP_FCGI_CHILDREN" => "50" |
|
743 | 735 |
), |
744 | 736 |
|
745 | 737 |
EOC; |
Also available in: Unified diff
Set max children to same amount as max procs