Leak on FreeBSD amd64?

"Eivind Eklund" <[email protected]> Thu, 24 Jan 2008 11:29:24 +0100
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
I'm seeing a leak/prefetch/something on Perl5.8.8 FreeBSD 6.3B2
DBD-mysql 4.006.  This creates severe problems for me, as it makes my
mod_perl processes grow to a size that I can't handle - and I'm not
seeing this problem on other machines, including another machine that
should have the same config (it has the same config for everything
Iv'e been able to check.)

I have a reproduction program here:

use DBI;
my $dbh = DBI->connect("dbi:mysql:host=my.machine.here;database=mydatabase","root","",{
'PrintError' => 0, 'RowCacheSize' => 1 } );
$dbh->{'RowCacheSize'} = 1;
my $sth = $dbh->prepare("SELECT * from amsCustomers");
$sth->execute();
while (my $single_hash = $sth->fetchrow_hashref()) {
    for (;;) {}    # Block execution
}

This simple little program grows to insane size (319MB), and then
shrinks again to another insane but about half as large size (180MB).
Changing or dropping RowCacheSize makes no difference - as far as I
can tell from the code in DBI, RowCacheSize is a dummy (even though it
SHOULD be what controls this).

Adding mysql_server_prepare=1 to the connect string above reduce the
insanity to 80MB - but - it should be 12MB, as before I started
loading up DBI.

In practice, this stuff leaks 1.5 to 3MB per request for my mod_perl
scripts (doing tiny queries), and totally blow up my frontend server.

I am about to start looking into the DBD driver to see what I can find
- any hints?  Or workarounds, other people that have had the same
problems, ... ?

Eivind.

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]