[freeside-commits] freeside/FS/bin freeside-torrus-srvderive, 1.35, 1.36
Ivan,,,
ivan at wavetail.420.am
Thu Apr 7 18:36:58 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv24017/FS/bin
Modified Files:
freeside-torrus-srvderive
Log Message:
continue attempting to handle mysql hanging on queries, RT#10574
Index: freeside-torrus-srvderive
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-torrus-srvderive,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -w -d -r1.35 -r1.36
--- freeside-torrus-srvderive 8 Apr 2011 01:31:48 -0000 1.35
+++ freeside-torrus-srvderive 8 Apr 2011 01:36:56 -0000 1.36
@@ -96,22 +96,22 @@
warn "executing search\n" if $DEBUG;
- my $alarm = 0;
eval {
- my $h = set_sig_handler( 'ALRM', sub { $alarm = 1; } );
+ my $h = set_sig_handler( 'ALRM', sub { die "_timeout\n"; } );
alarm(5*60); # 15*60);
$sth->execute($serviceid, $serviceid) or die $sth->errstr;
alarm(0);
};
alarm(0);
- die $@ if $@;
- if ( $alarm ) {
+ if ( $@ && $@ eq "_timeout\n" ) {
warn "search timed out; reconnecting and restarting\n";
dbh->clone()->do("KILL QUERY ". dbh->{"mysql_thread_id"})
if driver_name eq 'mysql';
adminsuidsetup($user);
next MAIN;
+ } elsif ( $@ ) {
+ die $@;
}
warn "search executed; checking results\n" if $DEBUG;
More information about the freeside-commits
mailing list