MySQL?!

Tony tonyt at ptialaska.net
Wed May 12 20:24:24 CDT 1999


On Wed, 12 May 1999, Arthur Corliss wrote:

> Greetings:
> 
> Quick question for you Perl/MySQL gurus:  we're a Perl script that
> creates HTML statistical reports from Apache log files (don't bother
> asking about it, the script's crap, written by some other nitwit, and is
> being replaced).  We're in the process of rolling our own replacement,
> but in the interim, we've modified the script to extract the applicable
> data from MySQL, via DBI.
> 
> Here's the problem--on a query that returns around 600,000 applicable
> log entries (the log entry has already been separated into separate
> columns in the table), memory usage of the script zooms over 150MB, and
> doesn't release it, even after continuing onto a much smaller query.
> 
> It is possible that the memory leak is in the original script, but are
> there any known issues with DBI/MySQL-DBD?  Just curious, since at one
> time, we were exploring using the Interbase RDBMS, but the Perl module
> for it (non-DBI) leaks like a sieve.
>
> BTW, who's using MySQL with tables on the order of gigabytes?  Anyone
> have to handle trying to squeeze indices on +3 million record tables
> into that damnable 2GB file size limit?
> 
> 	--Arthur Corliss
> 	  Bolverk's Lair -- http://www.odinicfoundation.org/arthur/
> 	  "Live Free or Die, the Only Way to Live" -- NH State Motto

I'm not using MySQL (I use Oracle and PostgreSQL), but I do have a
suggestion (though I suspect you are already doing this): you should free
your statement handle by issuing a "finish" command, like:

	$sth->finish();

This will close out the statement handle, and free the memory associated
with it.

If it doesn't free the memory after using "finish()", then chances are
it's a DBD leak.

							- Tony

===============================================================
Mailing list info:  If at any time you wish to (un|re)subscribe to the list send the
request to majordomo at hfb.pm.org.  All requests should be in the body, and look
like such
                  subscribe anchorage-pm-list
                  unsubscribe anchorage-pm-list



More information about the Anchorage-pm mailing list