Hi All,
> while (1) {
> my $sth = $Dbh->prepare("select user_id from users
> limit 1");
> print "sql executed and returned :",
> $sth->execute, "\n";
> $sth->finish();
> }
>
> make any difference?
I tried it. Here's the observation. Initially, the
script didn't eat so much RAM and it just stayed at
6604 MB for some time (atleast for 4 hours). I wanted
the script to run for more than a day. Next day, when
i did a 'top' in my RH Linux box, the mem. occupied
by the script was 8028 MB of RAM. Why the difference ?
May be, my test script wasn't a perfect one to check
for memory leaks in DBI or DBD::Pg. How can i create a
more efficient test script to check for memory leaks ?
Using the script, i should be able to find out any
memory leak, in about say 1 or 2 hours. Any thoughts ?
Also, i wanted to narrow down the problem, ie. whether
the problem is in DBI or DBD::Pg. Could anyone throw
some light on where should i start ? I can go by trial
& error method to find out but at the same time, i
feel there will be many guru's in this list who can
help me out.
Regards,
Guru Prasad.
--- Ian Barwick <barwick@gmx.net> wrote:
> On Wednesday 09 April 2003 06:58, Tom Lane wrote:
> > "P.N.Guru Prasad" <pnguruji@yahoo.com> writes:
> > > while (1) {
> > > print "sql executed and returned :",
> $Dbh->prepare("select user_id from
> > > users limit 1")->execute, "\n";
> > > }
> >
> > I'm not a DBI user, but I'd kinda expect that
> executing a query would
> > result in an object holding the results from that
> query. Don't you need
> > to do something to close/delete the result objects
> you're generating?
>
> Does
>
> while (1) {
> my $sth = $Dbh->prepare("select user_id from users
> limit 1");
> print "sql executed and returned :",
> $sth->execute, "\n";
> $sth->finish();
> }
>
> make any difference?
>
> If not try asking the dbi-users list,
> dbi-users@perl.org
> ( http://lists.perl.org/showlist.cgi?name=dbi-users
> )
>
> Ian Barwick
> barwick@gmx.net
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com