Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
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
Administrator
pve-manager
Commits
9831cb26
Commit
9831cb26
authored
Nov 10, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some comments about KeepAlive usage.
Seems KeepAlive spawns too many processes, so we cant use it.
parent
3fcc9c13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
REST.pm
PVE/REST.pm
+8
-0
startup.pl
www/manager/startup.pl
+1
-0
pve.conf
www/templates/pve.conf
+9
-5
No files found.
PVE/REST.pm
View file @
9831cb26
...
...
@@ -21,6 +21,8 @@ use PVE::RPCEnvironment;
use
Data::
Dumper
;
# fixme: remove
# my $MaxRequestsPerChild = 200;
my
$cookie_name
=
'
PVEAuthCookie
';
my
$baseuri
=
"
/api2
";
...
...
@@ -465,11 +467,17 @@ my $known_methods = {
DELETE
=>
1
,
};
my
$request_count
=
0
;
sub
handler
{
my
(
$r
)
=
@_
;
debug_msg
("
perl handler called
");
$request_count
++
;
# we do not use KeepAlive, so this is not necessary
# $r->child_terminate() if $request_count >= $MaxRequestsPerChild;
my
$method
=
$r
->
method
;
my
$clientip
=
$r
->
connection
->
remote_ip
();
...
...
www/manager/startup.pl
View file @
9831cb26
...
...
@@ -44,6 +44,7 @@ sub childinit {
}
sub
childexit
{
# BUG: seems this is not called if we do $r->child_terminate()
syslog
('
info
',
"
Finish child $$
");
}
...
...
www/templates/pve.conf
View file @
9831cb26
...
...
@@ -12,12 +12,16 @@ ServerTokens Prod
ServerAdmin
root
AddDefaultCharset
On
# Hint: Ajax use KeepAlive, which in effect disables MaxRequestsPerChild,
# so we need to disable KeepAlive to prevent exhaustive memory usage, or
# at least make sure that periodic updaters interval > KeepAliveTimeout
# or maybe we should set "MaxKeepAliveRequests 20"
# Hint1: Ajax use KeepAlive. We wnat that to get better performance.
# Hint2: We need to limit the number of request to avoid exhaustive
# memory usage (we still have small memory leaks).
# Apache KeepAlive in effect disables MaxRequestsPerChild,
# (max request are MaxRequestsPerChild*MaxKeepAliveRequests)
# so we implemented and additional limit in REST.pm
KeepAlive
Off
# But KeepAlive spawns too many processes - so we disable that for now
KeepAlive
off
MaxKeepAliveRequests
200
<
IfModule
mod_deflate
.
c
>
AddOutputFilterByType
DEFLATE
application
/
json
...
...
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