summaryrefslogtreecommitdiffstats
path: root/etc/inc/system.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-09-17 16:34:42 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-09-17 16:34:53 -0400
commit0396a8c0aab8b36c5f1d788ecc82bc604b4c8874 (patch)
tree0e8e86ac0eeebf1ef6c85ae97b0572d659fe2f6b /etc/inc/system.inc
parentcb42f385b6115c08fc89e989ddb4aa88c8acf3a9 (diff)
downloadpfsense-0396a8c0aab8b36c5f1d788ecc82bc604b4c8874.zip
pfsense-0396a8c0aab8b36c5f1d788ecc82bc604b4c8874.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/inc/system.inc')
-rw-r--r--etc/inc/system.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 711b171..986a9ef 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -755,6 +755,14 @@ 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