Revision 92880548
Added by Scott Ullrich almost 16 years ago
etc/inc/system.inc | ||
---|---|---|
748 | 748 |
$max_procs = 4; |
749 | 749 |
} |
750 | 750 |
|
751 |
if($captive_portal == true) { |
|
752 |
$bin_environment = <<<EOC |
|
753 |
"bin-environment" => ( |
|
754 |
"PHP_FCGI_CHILDREN" => "16", |
|
755 |
/* This problem seems to stem from a little-known issue with PHP: |
|
756 |
* PHP stops accepting new FastCGI connections after handling 500 requests; |
|
757 |
* unfortunately, there is a potential race condition during the PHP cleanup |
|
758 |
* code in which PHP can be shutting down but still have the socket open, so |
|
759 |
* lighty can send request number 501 to PHP and have it "accepted", but then |
|
760 |
* PHP appears to simply exit, causing a 500 return from lighty. |
|
761 |
*/ |
|
762 |
"PHP_FCGI_MAX_REQUESTS" => "500", |
|
763 |
"PHP_FCGI_CHILDREN" => "50" |
|
764 |
), |
|
751 |
if($captive_portal == true) { |
|
752 |
$bin_environment = <<<EOC |
|
753 |
"bin-environment" => ( |
|
754 |
"PHP_FCGI_MAX_REQUESTS" => "500", |
|
755 |
"PHP_FCGI_CHILDREN" => "$max_procs" |
|
756 |
), |
|
765 | 757 |
EOC; |
766 | 758 |
|
767 |
} else {
|
|
768 |
$bin_environment = "";
|
|
769 |
}
|
|
759 |
} else { |
|
760 |
$bin_environment = ""; |
|
761 |
} |
|
770 | 762 |
|
771 | 763 |
if($fast_cgi_enable == true) { |
772 | 764 |
$module = "\"mod_fastcgi\", \"mod_cgi\""; |
Also available in: Unified diff
Set max children to same amount as max procs