possible leak in 1.52
- From: modperl-list@xxxxxxxx (Jonathan Vanasco)
- Date: Mon, 21 Aug 2006 22:31:16 -0400
Hi.
I'm running 1.52 and I may have found a leak ( i found a discussion reported on the 1.51 branch, and a patch to 1.52, so i think this might be different )
I was profiling some mod_perl code for unexplained growth with Devel::Leak, and came across a growth of 1 reference count with every call to $dbh->prepare ( also to $dbh->do , but it seems to just wrap prepare ).
the growth seems to happen regardless of parameters supplied to do / prepare
my $handle;
my $count= Devel::Leak::NoteSV($handle);
=snip
my $query= $dbh->prepare( 'SELECT id FROM my_table' );
=snip
print STDERR "\n Count before: " . $count;
print STDERR "\n ------------------------------------------";
my $count_after= Devel::Leak::CheckSV($handle);
print STDERR "\n Count after: " . $count_after;
print STDERR "\n Leaked: " . ( $count_after - $count );
If i comment out the do/prepares, I have no leaks in reference counts.
Now , i'm using DBD::Pg with this, and it very well could be an issue with that driver and not the DBI. unfortunately, I can't install any other DB on my machines to test.
I haven't been able to trace things within DBI , as I'm not that familiar with it.
Off a fresh apache start, a call to the DBD prepare will cause a growth of ~10 references, then ~5, and then 1 per request. Between this and some other things online, I kind of think that it might have to do with DBI's caching of the statement. I couldn't find that in the code though.
.
- Follow-Ups:
- Re: possible leak in 1.52
- From: Jonathan
- Re: possible leak in 1.52
- Prev by Date: Re: "max" datatypes support of SQL Server 2005 for DBD-ODBC
- Next by Date: AutoCommit does not work
- Previous by thread: peer review: recipe for solving SELECT/INSERT/UPDATE race condition
- Next by thread: Re: possible leak in 1.52
- Index(es):
Relevant Pages
|
|