summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-09-17 16:36:33 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-09-17 16:36:33 -0400
commit8134cc27e8a39d7d6b3201254960f49bc58948eb (patch)
tree0358dc193a6b9b9f151e862d391dec96c7ce916d /etc/inc
parent6a01b7d954d7eac444a61bb36eef465bae811a4a (diff)
downloadpfsense-8134cc27e8a39d7d6b3201254960f49bc58948eb.zip
pfsense-8134cc27e8a39d7d6b3201254960f49bc58948eb.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')
-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 f95e195..657cff3 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -777,6 +777,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",
"idle-timeout" => 0,
{$bin_environment}
"bin-path" => "/usr/local/bin/php"
OpenPOWER on IntegriCloud