Commit df313030 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add a check (MAINSITE only) for excessive load (above 10) and return a

too busy error.

The test scripts will retry when it sees this error.
parent a4ffbffa
......@@ -98,6 +98,18 @@ if (NoLogins()) {
XMLError(503, "CM temporarily offline; please try again later");
}
#
# Check for excessive load
#
if ($MAINSITE) {
my $uptime = `uptime`;
if ($uptime =~ /load averages:\s+([\.\d]+),\s+([\.\d]+),\s+[\.\d]+/) {
if ($1 > 10.0) {
XMLError(511, "Server is WAY too busy; please try again later");
}
}
}
#
# Make sure the client presented a valid certificate that apache says
# is okay.
......
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