freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT speakeasy.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Memory leak when doing many INSERTs
- Date: Mon, 10 Sep 2001 23:07:55 -0400
Eric Deutsch wrote:
>
> Hi all, I've noticed what appears to be some memory leaking while doing lots
> of INSERTS. I'm using Perl 5.6.0 + DBD::Sybase 0.91 + FreeTDS (both 0.51a
> and latest CVS) under Red Hat 7.0 connecting to SQL Server 2000.
>
> If I do:
>
> $querystring="INSERT INTO leaktest (intfield,charfield,realfield) VALUES (
> 20,'chicken',3.1415 )";
> while ( 1 == 1 ) {
> $dbh->do($SQLstring);
> print ".";
> }
>
> after a suitable setup, and watch my process with top, the memory used grows
> and grows at a rate of maybe 5 MB/min.
>
> I'm assuming it is not unreasonable to expect a Perl script to be able to
> run INSERTs until SQL Server explodes without running into memory issues, is
> that true?
Eric,
It's reasonable to expect Perl to run SQL stuff 'til the cows come home,
yes. Given the relative sizes of the user bases and commensurate
eyeball count, I'd lay odds your problem is not in the base perl code.
I have no direct experience with it, but on other projects I follow
people sometimes use Electric Fence to solve malloc issues. Its claim
to fame is boundary checking, but it might reveal something. By Bruce
Perens.
I also found ccmalloc, which claims to log memory leaks.
http://rpmfind.net/linux/RPM/redhat/6.2/i386/ElectricFence-2.1-3.i386.html
http://www.inf.ethz.ch/personal/biere/projects/ccmalloc/
FreeTDS is the smallest project of the libraries you're using. I'd give
these a try and see what shows up. Either way, the results could prove
interesting.
HTH.
--jkl
-
Memory leak when doing many INSERTs,
Eric Deutsch, 09/10/2001
- <Possible follow-up(s)>
- Re: Memory leak when doing many INSERTs, James K. Lowden, 09/10/2001
- Re: Memory leak when doing many INSERTs, Steven J. Backus, 09/10/2001
- RE: Memory leak when doing many INSERTs, Eric Deutsch, 09/13/2001
- RE: Memory leak when doing many INSERTs, Brian Bruns, 09/14/2001
- RE: Memory leak when doing many INSERTs, Eric Deutsch, 09/14/2001
- RE: Memory leak when doing many INSERTs, Eric Deutsch, 09/14/2001
Archive powered by MHonArc 2.6.24.