version 1.94, 2011/11/08 22:25:25
|
version 1.95.10.1, 2012/02/17 22:47:39
|
Line 627 sub check_delayed_msg {
|
Line 627 sub check_delayed_msg {
|
} |
} |
|
|
&log($fh,"<p>Total unsend messages: <b>$unsend</b></p>\n"); |
&log($fh,"<p>Total unsend messages: <b>$unsend</b></p>\n"); |
$warnings=$warnings+5*$unsend; |
if ($unsend > 0) { |
|
$warnings=$warnings+5*$unsend; |
|
} |
|
|
if ($unsend) { $simplestatus{'unsend'}=$unsend; } |
if ($unsend) { $simplestatus{'unsend'}=$unsend; } |
&log($fh,"<h3>Outgoing Buffer</h3>\n<pre>"); |
&log($fh,"<h3>Outgoing Buffer</h3>\n<pre>"); |
Line 641 sub check_delayed_msg {
|
Line 643 sub check_delayed_msg {
|
} |
} |
&log($fh,"</pre>\n"); |
&log($fh,"</pre>\n"); |
close (DFH); |
close (DFH); |
|
my %hostname = &Apache::lonnet::all_hostnames(); |
|
my $numhosts = scalar(keys(%hostname)); |
# pong to all servers that have delayed messages |
# pong to all servers that have delayed messages |
# this will trigger a reverse connection, which should flush the buffers |
# this will trigger a reverse connection, which should flush the buffers |
foreach my $tryserver (keys %servers) { |
foreach my $tryserver (sort(keys(%servers))) { |
my $answer; |
if ($hostname{$tryserver} || !$numhosts) { |
eval { |
my $answer; |
local $SIG{ ALRM } = sub { die "TIMEOUT" }; |
eval { |
alarm(20); |
local $SIG{ ALRM } = sub { die "TIMEOUT" }; |
$answer = &Apache::lonnet::reply("pong",$tryserver); |
alarm(20); |
alarm(0); |
$answer = &Apache::lonnet::reply("pong",$tryserver); |
}; |
alarm(0); |
if ($@ && $@ =~ m/TIMEOUT/) { |
}; |
print "time out while contacting: $tryserver for pong\n"; |
if ($@ && $@ =~ m/TIMEOUT/) { |
|
&log($fh,"Attempted pong to $tryserver timed out<br />"); |
|
print "time out while contacting: $tryserver for pong\n"; |
|
} else { |
|
&log($fh,"Pong to $tryserver: $answer<br />"); |
|
} |
} else { |
} else { |
&log($fh,"Pong to $tryserver: $answer<br />"); |
&log($fh,"$tryserver has delayed messages, but is not part of the cluster -- skipping 'Pong'.<br />"); |
} |
} |
} |
} |
} |
} |
Line 803 sub main () {
|
Line 812 sub main () {
|
undef $perlvarref; |
undef $perlvarref; |
delete $perlvar{'lonReceipt'}; # remove since sensitive and not needed |
delete $perlvar{'lonReceipt'}; # remove since sensitive and not needed |
delete $perlvar{'lonSqlAccess'}; # remove since sensitive and not needed |
delete $perlvar{'lonSqlAccess'}; # remove since sensitive and not needed |
|
delete $perlvar{'reCAPTCHA_PRIVATE'}; # remove since sensitive and not needed |
|
delete $perlvar{'reCAPTCHA_PUBLIC'}; # remove since sensitive and not needed |
chdir($perlvar{'lonDaemons'}); |
chdir($perlvar{'lonDaemons'}); |
# --------------------------------------- Make sure that LON-CAPA is configured |
# --------------------------------------- Make sure that LON-CAPA is configured |
# I only test for one thing here (lonHostID). This is just a safeguard. |
# I only test for one thing here (lonHostID). This is just a safeguard. |