Ok, another day of messing around with this has produced some rather bizarre results.
I've stripped the code down to a "bare minimum", and am still running into issues:
foreach (sort keys %tickets)
{
my $ticket = ((split " ",$_)[0]);
my %tick_inf;
(%tick_inf = ars_GetEntry($rem,$schema,$ticket))
|| warn "Could not retrieve $ticket: $ars_errstr";
++$count;
print "$count\n";
next;
#all the other stuff from yesterday
}
Note that I added the
$count lines in there.
The results show that we are still chewing up huge amounts of memory, but at two different times. I ran this with a small subset of entries (about 700). At the start of the foreach loop, the memory usage steadily climbed to about 225 meg, about 100 tickets had been retrieved, then it started to drop, and ran the rest of the time at about 50 meg used.
What REALLY astonished me was at the end of the script. The last lines that I have in the script (immediately following the subroutine calls to the sub that this loop is in) read as:
print "Script ended on " . localtime(time);
print "\n";
But for some reason, once I saw the print-out saying that it ended, the memory usage jumped BACK up to 225 meg, and the script took another 2 or 3 minutes to exit. WTF is that? Clearing the buffer or something along those lines?? There is honest to god NOTHING else after those lines above, yet I clearly saw the output before the memory usage jumped back up.
The first portion above is pretty consistent with what I was seeing previously, the second thing to me is really bizarre. -- HELP -- :-)