summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-20 21:49:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-20 21:49:00 +0000
commitc51520593d0f2f4db2269aa3234dbb6c64def2c1 (patch)
treea42106fd1c3dfff1408820a979933768ad1b8fdc
parent8798990f2ad4f0bbe035cb8ac12cd9690df83e2b (diff)
downloadpfsense-c51520593d0f2f4db2269aa3234dbb6c64def2c1.zip
pfsense-c51520593d0f2f4db2269aa3234dbb6c64def2c1.tar.gz
* same changes from [6378] to the changes adopted in [6297]
* cleanup comments Ticket #540
-rw-r--r--etc/inc/captiveportal.inc15
1 files changed, 12 insertions, 3 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 41c81fe..977e0dc 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -168,16 +168,25 @@ EOD;
fwrite($fd, $key);
fclose($fd);
}
- /* get memory in meachine */
+
+ /*
+ * get available memory in machine then deterimine
+ * how many procs captiveportal should start out with.
+ * with one of our users at a school they sometimes have
+ * login spikes with 400+ users logging in around the same
+ * time. in m0n0/mini_httpd it would hit the 16 concurrent
+ * limit so some users would receive a http server busy
+ * error.
+ */
$memory = get_memory();
$avail = $memory[0];
$use_fastcgi = true;
if($avail > 0 and $avail < 65) {
$procs = 1;
$use_fastcgi = false;
- } else if($avail > 64 and $avail < 128) {
+ } else if($avail > 64 and $avail < 120) {
$procs = 2;
- } else if($avail > 128 and $avail < 164) {
+ } else if($avail > 120 and $avail < 160) {
$procs = 3;
} else if($avail > 164 and $avail < 256) {
$procs = 4;
OpenPOWER on IntegriCloud