From: Jochen Wiedmann Date: January 10 2003 10:07am Subject: Re: Mem leak upon recovering after a disconnect List-Archive: http://lists.mysql.com/perl/1999 Message-Id: <1042193254.3e1e9b666e4da@webmail.LF.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Zitiere John Heitmann : > for my $i (1..1000) { > my $dbh = DBI->connect(...); > $dbh->disconnect(); > $dbh->do(something); > sleep(1); > } I do get you right, that the problem is caused because you attempt to use a closed connection? > It is easy to workaround once we found the problem, we just check the > Active flag before we do anything. Finding the problem took quite > awhile though :-( By that you mean that you omit using the closed connection? > I understand that the above construct is dubious. It is not what I would have expected the users to do. :-) Question: What happens, if you set the RaiseError flag and trap the exception in the loop? (Using RaiseError is definitely recommended.) Does that help? Regards, Jochen