summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-17 13:53:42 -0400
committerjim-p <jimp@pfsense.org>2011-06-17 13:53:42 -0400
commitc41602e15ccb10cadb70d3295021a2208b0f4ba4 (patch)
tree49d628217e3a7d527e1675c5cf6419ed768ba3df /etc
parent24cbe7a895c78ce12cde907ab4994630391567e0 (diff)
downloadpfsense-c41602e15ccb10cadb70d3295021a2208b0f4ba4.zip
pfsense-c41602e15ccb10cadb70d3295021a2208b0f4ba4.tar.gz
Add a GUI field to adjust the max number of processes for lighttpd.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 3f6bc3a..4857ccf 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -739,8 +739,10 @@ function system_webgui_start() {
}
/* generate lighttpd configuration */
+ $max_procs = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
system_generate_lighty_config("{$g['varetc_path']}/lighty-webConfigurator.conf",
- $crt, $key, $ca, "lighty-webConfigurator.pid", $portarg, "/usr/local/www/");
+ $crt, $key, $ca, "lighty-webConfigurator.pid", $portarg, "/usr/local/www/",
+ "cert.pem", "ca.pem", $max_procs);
/* attempt to start lighthttpd */
$res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-webConfigurator.conf");
@@ -820,6 +822,7 @@ function system_generate_lighty_config($filename,
}
// Ramp up captive portal max procs
+ // Work relative to the default of 2, for values that would be >2.
if($captive_portal == true) {
if($avail > 65 and $avail < 98) {
$max_procs = 1;
@@ -828,13 +831,13 @@ function system_generate_lighty_config($filename,
$max_procs = 2;
}
if($avail > 127 and $avail < 256) {
- $max_procs = 3;
+ $max_procs += 1;
}
if($avail > 255 and $avail < 384) {
- $max_procs = 4;
+ $max_procs += 2;
}
if($avail > 383) {
- $max_procs = 5;
+ $max_procs += 3;
}
}
OpenPOWER on IntegriCloud