Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Simple issue for a perl/Oracle guru?

Simple issue for a perl/Oracle guru?

From: Lee Crampton <lee_at_avbrief.com>
Date: Wed, 6 Mar 2002 15:58:16 -0000
Message-ID: <0%qh8.109944$Ah1.15179171@news2-win.server.ntlworld.com>


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:



for (my $i = 1; $i < 10; $i++)
{

    my $logger = new DBlog ({ dbtype => $dbd, dbname => 'DBlog', dbtable => $tablename });

    # all other code removed
}


I have reduced the perl module to the following:



package DBlog;
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use DBI;
use Data::Dumper;
use Avbrief::Util;

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 ();

}
Received on Wed Mar 06 2002 - 09:58:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US