summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-06-09 17:07:43 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-06-09 17:07:43 -0400
commit70cc6249028e4c3d4dc2b0906239e22f5a19f8c2 (patch)
treed0333d4e9039246bd7f535e7dc1ea30ceae9d9fc
parentf6f057410b0020efa786d655c40888b7fc2d3b61 (diff)
downloadpfsense-70cc6249028e4c3d4dc2b0906239e22f5a19f8c2.zip
pfsense-70cc6249028e4c3d4dc2b0906239e22f5a19f8c2.tar.gz
Only change max procs for captive portal configurations
-rw-r--r--etc/inc/system.inc39
1 files changed, 19 insertions, 20 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index a7c3423..f5ca56f 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -719,7 +719,7 @@ function system_generate_lighty_config($filename,
$document_root = "/usr/local/www/",
$cert_location = "cert.pem",
$ca_location = "ca.pem",
- $max_procs = 2,
+ $max_procs = 1,
$max_requests = "1",
$fast_cgi_enable = true,
$captive_portal = false) {
@@ -768,24 +768,23 @@ function system_generate_lighty_config($filename,
$fast_cgi_enable = false;
}
- if($avail > 65 and $avail < 98) {
- $max_procs = 1;
- }
-
- if($avail > 97 and $avail < 128) {
- $max_procs = 2;
- }
-
- if($avail > 127 and $avail < 256) {
- $max_procs = 3;
- }
-
- if($avail > 255 and $avail < 384) {
- $max_procs = 4;
- }
-
- if($avail > 383) {
- $max_procs = 5;
+ // Ramp up captive portal max procs
+ if($captive_portal == true) {
+ if($avail > 65 and $avail < 98) {
+ $max_procs = 1;
+ }
+ if($avail > 97 and $avail < 128) {
+ $max_procs = 2;
+ }
+ if($avail > 127 and $avail < 256) {
+ $max_procs = 3;
+ }
+ if($avail > 255 and $avail < 384) {
+ $max_procs = 4;
+ }
+ if($avail > 383) {
+ $max_procs = 5;
+ }
}
if($captive_portal == true) {
@@ -1445,4 +1444,4 @@ function system_get_dmesg_boot() {
return file_get_contents("{$g['varlog_path']}/dmesg.boot");
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud