Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
71f7dbc3
Commit
71f7dbc3
authored
Nov 17, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) kill max_procs / memory foo and set new defaults
parent
d1842a56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
37 deletions
+2
-37
system.inc
src/etc/inc/system.inc
+2
-16
system_advanced_admin.php
src/www/system_advanced_admin.php
+0
-21
No files found.
src/etc/inc/system.inc
View file @
71f7dbc3
...
@@ -1049,20 +1049,6 @@ EOD;
...
@@ -1049,20 +1049,6 @@ EOD;
else
else
$lighty_port
=
$port
;
$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'
]))
{
if
(
!
isset
(
$config
[
'syslog'
][
'nologlighttpd'
]))
{
$lighty_use_syslog
=
<<<EOD
$lighty_use_syslog
=
<<<EOD
## where to send error-messages to
## where to send error-messages to
...
@@ -1079,9 +1065,9 @@ fastcgi.server = ( ".php" =>
...
@@ -1079,9 +1065,9 @@ fastcgi.server = ( ".php" =>
( "localhost" =>
( "localhost" =>
(
(
"socket" => "{$fast_cgi_path}",
"socket" => "{$fast_cgi_path}",
"max-procs" =>
{$max_procs}
,
"max-procs" =>
2
,
"bin-environment" => (
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "
{$max_php_children}
",
"PHP_FCGI_CHILDREN" => "
3
",
"PHP_FCGI_MAX_REQUESTS" => "100"
"PHP_FCGI_MAX_REQUESTS" => "100"
),
),
"bin-path" => "/usr/local/bin/php-cgi"
"bin-path" => "/usr/local/bin/php-cgi"
...
...
src/www/system_advanced_admin.php
View file @
71f7dbc3
...
@@ -38,7 +38,6 @@ require_once("services.inc");
...
@@ -38,7 +38,6 @@ require_once("services.inc");
$pconfig
[
'webguiproto'
]
=
$config
[
'system'
][
'webgui'
][
'protocol'
];
$pconfig
[
'webguiproto'
]
=
$config
[
'system'
][
'webgui'
][
'protocol'
];
$pconfig
[
'webguiport'
]
=
$config
[
'system'
][
'webgui'
][
'port'
];
$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
[
'ssl-certref'
]
=
$config
[
'system'
][
'webgui'
][
'ssl-certref'
];
$pconfig
[
'disablehttpredirect'
]
=
isset
(
$config
[
'system'
][
'webgui'
][
'disablehttpredirect'
]);
$pconfig
[
'disablehttpredirect'
]
=
isset
(
$config
[
'system'
][
'webgui'
][
'disablehttpredirect'
]);
$pconfig
[
'disableconsolemenu'
]
=
isset
(
$config
[
'system'
][
'disableconsolemenu'
]);
$pconfig
[
'disableconsolemenu'
]
=
isset
(
$config
[
'system'
][
'disableconsolemenu'
]);
...
@@ -79,12 +78,6 @@ if ($_POST) {
...
@@ -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'
])
{
if
(
$_POST
[
'althostnames'
])
{
$althosts
=
explode
(
" "
,
$_POST
[
'althostnames'
]);
$althosts
=
explode
(
" "
,
$_POST
[
'althostnames'
]);
foreach
(
$althosts
as
$ah
)
{
foreach
(
$althosts
as
$ah
)
{
...
@@ -125,9 +118,6 @@ if ($_POST) {
...
@@ -125,9 +118,6 @@ if ($_POST) {
if
(
update_if_changed
(
"webgui certificate"
,
$config
[
'system'
][
'webgui'
][
'ssl-certref'
],
$_POST
[
'ssl-certref'
]))
{
if
(
update_if_changed
(
"webgui certificate"
,
$config
[
'system'
][
'webgui'
][
'ssl-certref'
],
$_POST
[
'ssl-certref'
]))
{
$restart_webgui
=
true
;
$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"
)
{
if
(
$_POST
[
'disablehttpredirect'
]
==
"yes"
)
{
$config
[
'system'
][
'webgui'
][
'disablehttpredirect'
]
=
true
;
$config
[
'system'
][
'webgui'
][
'disablehttpredirect'
]
=
true
;
...
@@ -394,17 +384,6 @@ endif; ?>
...
@@ -394,17 +384,6 @@ endif; ?>
</span>
</span>
</td>
</td>
</tr>
</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>
<tr>
<td
width=
"22%"
valign=
"top"
class=
"vncell"
>
<?=
gettext
(
"WebGUI redirect"
);
?>
</td>
<td
width=
"22%"
valign=
"top"
class=
"vncell"
>
<?=
gettext
(
"WebGUI redirect"
);
?>
</td>
<td
width=
"78%"
class=
"vtable"
>
<td
width=
"78%"
class=
"vtable"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment