On Aug 23, 2006, at 8:55 AM, Ephraim Dan wrote:

I tried to reproduce your leak without success. Perhaps you are not letting your test run for enough iterations. DBI does cache some handles that it only releases every 120 calls. So you could see what looks like a 1 SV leak, but you'll see that after 120 iterations they are all freed.

OK. I tried 200, and that seemed to clear up a large number of them, and anything i was worried about. SVs went down by 120 every 120 calls

this doesn't apply to my needs, but are DB connects cached as well with a separate 120 counter?

using pg, i saw this

 count CONNECT3 : 14427
count undef3 : 14320
count CONNECT4 : 14428
count undef4 : 14321

the code for that was just

$dbh = DBI->connect( $_db_config{'dbi'}, $_db_config{'dbUser'}, $_db_config{'dbPass'} , $_db_config{'dbArgs'} ) or die "Could not connect";
        $count= Devel::Leak::NoteSV($handle);
        print STDERR "\n count CONNECT3 : $count ";
undef $dbh;
        $count= Devel::Leak::NoteSV($handle);
        print STDERR "\n count undef3 : $count ";
$dbh = DBI->connect( $_db_config{'dbi'}, $_db_config{'dbUser'}, $_db_config{'dbPass'} , $_db_config{'dbArgs'} ) or die "Could not connect";
        $count= Devel::Leak::NoteSV($handle);
        print STDERR "\n count CONNECT4 : $count ";
undef $dbh;
        $count= Devel::Leak::NoteSV($handle);
        print STDERR "\n count undef4 : $count ";
        

Reply via email to