Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Simple issue for a perl/Oracle guru?
Any suggestions gratefully received.
Thanks in advance.
Lee
I have a test perl script which does little more than create (in a loop) new objects, each of which connects to the DB. The trouble is the script hangs after the second connection. I have simplified everything and cannot see what might be causing this issue even after viewing trace output.
The process ends up hung like this:
root 31307 0.0 0.3 1820 812 pts/0 S 15:49 0:00 make test root 31316 92.5 4.4 12904 11384 pts/0 R 15:49 0:27 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6 oracle 31318 0.2 0.0 0 0 ? Z 15:49 0:00 [oracle<defunct>]
Here's the loop:
my $logger = new DBlog ({ dbtype => $dbd, dbname => 'DBlog', dbtable => $tablename });
# all other code removed
}
I have reduced the perl module to the following:
require Exporter;
require AutoLoader;
@ISA = qw(Exporter AutoLoader);
@EXPORT = qw();
$VERSION = '0.01';
sub new
{
my ($pkg, $data) = @_;
$data->{dbh} = DBI->connect ($datasource, "SYSTEM", "MANAGER") or die "Could not connect:$DBI::errstr";
return bless $data, $pkg;
}
sub DESTROY
{
my ($data) = @_; $data->{dbh}->disconnect ();