From c51520593d0f2f4db2269aa3234dbb6c64def2c1 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 20 Sep 2005 21:49:00 +0000 Subject: * same changes from [6378] to the changes adopted in [6297] * cleanup comments Ticket #540 --- etc/inc/captiveportal.inc | 15 ++++++++++++--- 1 file 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; -- cgit v1.1