I had the same problem running the following version.

# perl -v

This is perl, version 5.005_03 built for sun4-solaris
Solaris 2.6
                                                                         
     Thu Jan 13 17:22:49 2000: Module the DBI manpage                     
     o   installed into: /apps/perl/lib/site_perl/5.005                   
     o   LINKTYPE: dynamic                                                
     o   VERSION: 1.13                                                    
     o   EXE_FILES: dbish dbiproxy                                        
     Thu Jan 13 17:36:26 2000: Module the DBD::Oracle manpage             
     o   installed into: /apps/perl/lib/site_perl/5.005                   
     o   LINKTYPE: dynamic                                                
     o   VERSION: 1.03                                                    
     o   EXE_FILES: ora_explain  


However, according to Tim this is a Perl problem.  I tried the workaround
suggested bellow w/out success.


On Fri, Mar 30, 2001 at 10:02:14AM -0500, Ondercin, Boris wrote:
> Is the workaround setting $dbh->{RaiseError}=0 ?

Don't use local() on handle attribute. Reset the attribute value
explicitly at the end of the block and in any exception handlers that
may catch exceptions thrown from within the block (which would
thereforce miss your explicit resetting of the attribue).

Tim.

> -----Original Message-----
> From: Tim Bunce [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 9:40 AM
> To: [EMAIL PROTECTED]
> Subject: Memory leak on local($dbh->{RaiseError})=1 is a perl bug
> 
> 
> Here's a copy of a bug report I just sent to perl5-porters.
> 
> FTI, DBI 1.15 will be released shortly :)
> 
> Tim.
> 
> ----- Forwarded message from Tim Bunce <[EMAIL PROTECTED]> -----
> 
> Date: Fri, 30 Mar 2001 15:38:27 +0100
> From: Tim Bunce <[EMAIL PROTECTED]>
> To: Perl 5 porters <[EMAIL PROTECTED]>
> Cc: Tim Bunce <[EMAIL PROTECTED]>
> Subject: Memory leak localizing a tied variable
> 
> The script appended below demonstrates a memory leak when doing a
> local() on a tied variable.
> 
> I found this because someone reported that local($dbh->{RaiseError})=1
> (and similar) leaked memory and thought it maybe a DBI bug.
> The script demonstrates that it's not.
> 
> Perl 5.005 and 5.006 leak but 5.004 doesn't. I've not got a 5.7.0
> handy. I'd be grateful if someone could test it on the current bleadperl.
> 
> Thanks.
> 
> Tim.
> 
> #!/usr/local/bin/perl -w
> 
> print "localizing tied variable leak test for perl $]...\n";
> # 5.006   does leak
> # 5.00503 does leak
> # 5.00404 doesn't leak
> 
> use strict;
> use Tie::Hash;
> tie my %tie_hash => 'Tie::StdHash';
> 
> my $count = 0;
> my $ps = (-d '/proc') ? "ps -lp " : "ps -l";
> 
> mem_test() while 1;
> 
> sub mem_test {
>     system("echo $count; $ps$$") if (($count++ % 1000) == 0);
>     local($tie_hash{Foo}) = 1;
> }
> 
> ----- End forwarded message -----

-----Original Message-----
From: Mickey Mestel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 3:59 PM
To: Dbi-Users@Perl. Org
Subject: DBD:Oracle memory leak


hi,

        i posted a few weeks ago, and didn't get an answer, so i'm trying
again.  i
assume that if i'm seeing this problem, then someone else must be as well.

        there was a memory leak in DBD::Oracle 1.2 (i'm pretty sure it was
1.2)
that came about on connect/disconnect.  it was a running thread, and someone
mailed me a patch, (that worked), and then it was incorporated into 1.3.  i
am now running the following configuration:

        solaris 7
        DBI 1.14
        DBD::Oracle 1.6
        Summary of my perl5 (5.0 patchlevel 5 subversion 2)
        Oracle 8.1.7

        and the problem is back.  my application runs forever as a daemon,
and
connects and disconnects all the time.  the memory leak last time was on the
order of 32k each connect, something like that, so the processes grow to the
point that the machine hangs.

        has anyone else seen this?  is there a patch floating around?  i can
go
search the archives for the last one and see if that works.

        any thoughts?

        thanks,

        mickm

BayGate, Inc.
539 Bryant St. # 400
San Francisco, CA 94107
Phone: 415.908.3944
Fax: 415.908.3945
www.baygate.com

Reply via email to