[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: loncom / loncron
From: raeburn <raeburn () source ! lon-capa ! org>
Date: 2011-10-28 14:26:15
Message-ID: cvsraeburn1319811975 () cvsserver
[Download RAW message or body]
raeburn Fri Oct 28 14:26:15 2011 EDT
Modified files:
/loncom loncron
Log:
- 20s timeout when attempting to contact each server with an entry in
/home/httpd/sockets/delayed.
Index: loncom/loncron
diff -u loncom/loncron:1.90 loncom/loncron:1.91
--- loncom/loncron:1.90 Fri Jun 3 20:45:10 2011
+++ loncom/loncron Fri Oct 28 14:26:15 2011
@@ -2,7 +2,7 @@
# Housekeeping program, started by cron, loncontrol and loncron.pl
#
-# $Id: loncron,v 1.90 2011/06/03 20:45:10 raeburn Exp $
+# $Id: loncron,v 1.91 2011/10/28 14:26:15 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -652,8 +652,18 @@
# pong to all servers that have delayed messages
# this will trigger a reverse connection, which should flush the buffers
foreach my $tryserver (keys %servers) {
- my $answer=&Apache::lonnet::reply("pong",$tryserver);
- &log($fh,"Pong to $tryserver: $answer<br />");
+ my $answer;
+ eval {
+ local $SIG{ ALRM } = sub { die "TIMEOUT" };
+ alarm(20);
+ $answer = &Apache::lonnet::reply("pong",$tryserver);
+ alarm(0);
+ };
+ if ($@ && $@ =~ m/TIMEOUT/) {
+ print "time out while contacting: $tryserver for pong\n";
+ } else {
+ &log($fh,"Pong to $tryserver: $answer<br />");
+ }
}
}
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic