From: ivan Date: Sun, 17 Apr 2011 18:48:25 +0000 (+0000) Subject: try at a multiprocess torrus-srvderive to hopefully catch/keep up, RT#10574 X-Git-Tag: freeside_2_3_0~363 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=184cd3c86cccf8cb4710c25a871018361960906f;p=freeside.git try at a multiprocess torrus-srvderive to hopefully catch/keep up, RT#10574 --- diff --git a/FS/bin/freeside-torrus-srvderive b/FS/bin/freeside-torrus-srvderive index d3ea419a8..e83318fe8 100644 --- a/FS/bin/freeside-torrus-srvderive +++ b/FS/bin/freeside-torrus-srvderive @@ -59,8 +59,8 @@ my $sql = " my $orderlimit = " ORDER BY srv_date, srv_time - LIMIT 50 -"; + LIMIT 100 +"; #50? our $kids = 0; @@ -99,6 +99,10 @@ while (1) { my @serviceids = $torrus_srvderive->component_serviceids; exit unless @serviceids; #don't try to search for empty virtual ports + #nonlocking select statements; rows in this table never change + dbh->do('SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED') + if driver_name eq 'mysql'; + my @in = (); for my $dir ('_IN', '_OUT') { push @in, map dbh->quote("$_$dir"), @serviceids; @@ -163,7 +167,7 @@ while (1) { die $@; } - warn "search finished; checking results\n" if $DEBUG; + warn "search for $serviceid finished; checking results\n" if $DEBUG; my $prev = 0; while ( my $row = $sth->fetchrow_arrayref ) {