summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-09-17 16:39:20 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-09-17 16:39:20 -0400
commitb024bf2f483ecf6fa8b39b219ba78eaae32e251e (patch)
tree59587b24accd67761b99859db301ed0395460cf7 /etc
parent0396a8c0aab8b36c5f1d788ecc82bc604b4c8874 (diff)
downloadpfsense-b024bf2f483ecf6fa8b39b219ba78eaae32e251e.zip
pfsense-b024bf2f483ecf6fa8b39b219ba78eaae32e251e.tar.gz
Adding PHP_FCGI_MAX_REQUESTS => 500. This problem seems to stem from a little-known issue with PHP: PHP stops accepting new FastCGI connections after handling 500 requests; unfortunately, there is a potential race condition during the PHP cleanup code in which PHP can be shutting down but still have the socket open, so lighty can send request number 501 to PHP and have it accepted, but then PHP appears to simply exit, causing a 500 return from lighty.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc20
1 files changed, 11 insertions, 9 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 986a9ef..4d5c49a 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -736,7 +736,17 @@ EOC;
$bin_environment = <<<EOC
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "1",
- "PHP_FCGI_MAX_REQUESTS" => "{$max_requests}"
+ "PHP_FCGI_MAX_REQUESTS" => "{$max_requests}",
+ "PHP_FCGI_MAX_REQUESTS" => "{$max_requests}",
+ /* This problem seems to stem from a little-known issue with PHP:
+ * PHP stops accepting new FastCGI connections after handling 500 requests;
+ * unfortunately, there is a potential race condition during the PHP cleanup
+ * code in which PHP can be shutting down but still have the socket open, so
+ * lighty can send request number 501 to PHP and have it "accepted", but then
+ * PHP appears to simply exit, causing a 500 return from lighty.
+ */
+ "PHP_FCGI_MAX_REQUESTS" => "500",
+ "PHP_FCGI_CHILDREN" => "50"
),
EOC;
@@ -755,14 +765,6 @@ fastcgi.server = ( ".php" =>
"socket" => "/tmp/php-fastcgi.socket",
"min-procs" => 1,
"max-procs" => {$max_procs},
- /* This problem seems to stem from a little-known issue with PHP:
- * PHP stops accepting new FastCGI connections after handling 500 requests;
- * unfortunately, there is a potential race condition during the PHP cleanup
- * code in which PHP can be shutting down but still have the socket open, so
- * lighty can send request number 501 to PHP and have it "accepted", but then
- * PHP appears to simply exit, causing a 500 return from lighty.
- */
- "PHP_FCGI_MAX_REQUESTS" => "500",
{$bin_environment}
"bin-path" => "/usr/local/bin/php"
)
OpenPOWER on IntegriCloud