Commit 71f7dbc3 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) kill max_procs / memory foo and set new defaults

parent d1842a56
......@@ -1049,20 +1049,6 @@ EOD;
else
$lighty_port = $port;
$memory = get_memory();
$realmem = $memory[1];
// Determine web GUI process settings and take into account low memory systems
if ($realmem < 255)
$max_procs = 1;
else
$max_procs = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
if ($realmem < 78)
$max_php_children = 0;
else
$max_php_children = 5;
if(!isset($config['syslog']['nologlighttpd'])) {
$lighty_use_syslog = <<<EOD
## where to send error-messages to
......@@ -1079,9 +1065,9 @@ fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "{$fast_cgi_path}",
"max-procs" => {$max_procs},
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "{$max_php_children}",
"PHP_FCGI_CHILDREN" => "3",
"PHP_FCGI_MAX_REQUESTS" => "100"
),
"bin-path" => "/usr/local/bin/php-cgi"
......
......@@ -38,7 +38,6 @@ require_once("services.inc");
$pconfig['webguiproto'] = $config['system']['webgui']['protocol'];
$pconfig['webguiport'] = $config['system']['webgui']['port'];
$pconfig['max_procs'] = ($config['system']['webgui']['max_procs']) ? $config['system']['webgui']['max_procs'] : 2;
$pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref'];
$pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']);
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
......@@ -79,12 +78,6 @@ if ($_POST) {
}
}
if ($_POST['max_procs']) {
if (!is_numeric($_POST['max_procs']) || ($_POST['max_procs'] < 1) || ($_POST['max_procs'] > 500)) {
$input_errors[] = gettext("Max Processes must be a number 1 or greater");
}
}
if ($_POST['althostnames']) {
$althosts = explode(" ", $_POST['althostnames']);
foreach ($althosts as $ah) {
......@@ -125,9 +118,6 @@ if ($_POST) {
if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref'])) {
$restart_webgui = true;
}
if (update_if_changed("webgui max processes", $config['system']['webgui']['max_procs'], $_POST['max_procs'])) {
$restart_webgui = true;
}
if ($_POST['disablehttpredirect'] == "yes") {
$config['system']['webgui']['disablehttpredirect'] = true;
......@@ -394,17 +384,6 @@ endif; ?>
</span>
</td>
</tr>
<tr>
<td valign="top" class="vncell"><?=gettext("Max Processes"); ?></td>
<td class="vtable">
<input name="max_procs" type="text" class="formfld unknown" id="max_procs" size="5" value="<?=htmlspecialchars($pconfig['max_procs']);?>" />
<span class="vexpl">
<?=gettext("Enter the number of webConfigurator processes you " .
"want to run. This defaults to 2. Increasing this will allow more " .
"users/browsers to access the GUI concurrently."); ?>
</span>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI redirect"); ?></td>
<td width="78%" class="vtable">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment