projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
40b7a45
)
continue attempting to handle mysql hanging on queries, RT#10574
author
ivan
<ivan>
Fri, 8 Apr 2011 01:27:56 +0000
(
01:27
+0000)
committer
ivan
<ivan>
Fri, 8 Apr 2011 01:27:56 +0000
(
01:27
+0000)
FS/bin/freeside-torrus-srvderive
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-torrus-srvderive
b/FS/bin/freeside-torrus-srvderive
index
95cc76d
..
4ee367b
100644
(file)
--- a/
FS/bin/freeside-torrus-srvderive
+++ b/
FS/bin/freeside-torrus-srvderive
@@
-94,11
+94,13
@@
MAIN: while (1) {
warn $ssql if $DEBUG > 2;
my $sth = dbh->prepare($ssql) or die $DBI::errstr; #better recovery here?
warn $ssql if $DEBUG > 2;
my $sth = dbh->prepare($ssql) or die $DBI::errstr; #better recovery here?
- warn "executing search" if $DEBUG;
+ warn "executing search
\n
" if $DEBUG;
eval {
eval {
- my $
timeout
= set_sig_handler(
+ my $
h
= set_sig_handler(
'ALRM', sub {
'ALRM', sub {
+ local $SIG{__DIE__};
+ warn "search timed out\n";
dbh->clone()->do("KILL QUERY ". dbh->{"mysql_thread_id"})
if driver_name eq 'mysql';
die '_timeout';
dbh->clone()->do("KILL QUERY ". dbh->{"mysql_thread_id"})
if driver_name eq 'mysql';
die '_timeout';
@@
-118,7
+120,7
@@
MAIN: while (1) {
die $@;
}
die $@;
}
- warn "search executed; checking results" if $DEBUG;
+ warn "search executed; checking results
\n
" if $DEBUG;
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {