projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
90c85ed
)
recover better from mysql's deadlock stupidity, grr, RT#10574
author
ivan
<ivan>
Tue, 15 Mar 2011 21:26:02 +0000
(21:26 +0000)
committer
ivan
<ivan>
Tue, 15 Mar 2011 21:26:02 +0000
(21:26 +0000)
FS/bin/freeside-torrus-srvderive
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-torrus-srvderive
b/FS/bin/freeside-torrus-srvderive
index
b4113b7
..
0441c47
100644
(file)
--- a/
FS/bin/freeside-torrus-srvderive
+++ b/
FS/bin/freeside-torrus-srvderive
@@
-55,7
+55,7
@@
my $sql = "
my $orderlimit = "
ORDER BY srv_date, srv_time
my $orderlimit = "
ORDER BY srv_date, srv_time
- LIMIT
10
0
+ LIMIT
5
0
";
";
@@
-130,7
+130,12
@@
while (1) {
if $DEBUG > 2;
my $isth = dbh->prepare($isql) or die $DBI::errstr; #better recovery?
if $DEBUG > 2;
my $isth = dbh->prepare($isql) or die $DBI::errstr; #better recovery?
- $isth->execute( @param ) or die $isth->errstr;
+
+ #stupid mysql deadlocks all the time here, so we need to recover
+ $isth->execute( @param ) or do {
+ warn "Error inserting data for $serviceid$dir (restarting): ".
+ $isth->errstr;
+ }
}
}