cmahajan has asked for the wisdom of the Perl Monks concerning the following question:
I am running DBI version 1.616 along with DBD::Sybase version 1.12 to connect to the Sybase IQ 15.4 server through one of my Perl modules. The platform is IBM AIX 5.3.0.0 maintenance level 5300-12
The problem that I am facing is that one of my simple queries randomly hangs for no apparant reason. The query is to select some data from the system view SYS.SYSTABLE. The code runs fine as such but every once in a while the code (execute statement) freezes and appears to be doing noting for a long time and I have to terminate the process forcibly.
Below is a fragment of code that I'm running (all variables are properly defined):
AutoCommit is set to 1
RaiseError is set to 1
Can someone help me figure out what might be wrong with the code or if any of the modules versions that I am using are incompatible with Sybase IQ 15.4. Another interesting thing to note is that the same code works fine most of the times, but the problem occurs randomly at random times. I have checked the active connections in my database when the code hangs, there are no deadlocks or blocked processes. I can also see that the connection to DB is being established successfully but I do not see any active executing statements at all for the DB handle.$dsn = "dbi:Sybase:serverType=IQ:loginTimeout=240:server=$db_server_if +c"; my $dbh = DBI->connect($dsn, $self->get_db_username(), $self->get_db_password(), \%connect_options ); my $sqlA =<< "END_SQLA"; SELECT table_id FROM sys.systable WHERE table_name like '${uc_table_name}%' AND length(table_name) = $table_name_len AND user_name(creator) = '$uc_schema' END_SQLA my $sthA = $dbh->prepare($sqlA); $sthA->execute();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBD::Sybase query execute hangs randomly for Sybase IQ 15.4
by jfroebe (Parson) on Jun 18, 2013 at 16:37 UTC | |
Re: DBD::Sybase query execute hangs randomly for Sybase IQ 15.4
by mpeppler (Vicar) on Jun 18, 2013 at 14:36 UTC | |
Re: DBD::Sybase query execute hangs randomly for Sybase IQ 15.4
by sundialsvc4 (Abbot) on Jun 18, 2013 at 17:45 UTC | |
by cmahajan (Initiate) on Jun 19, 2013 at 15:26 UTC | |
by jfroebe (Parson) on Jun 19, 2013 at 17:13 UTC | |
by cmahajan (Initiate) on Jun 20, 2013 at 01:34 UTC | |
by cmahajan (Initiate) on Jun 25, 2013 at 02:47 UTC | |
by jfroebe (Parson) on Sep 19, 2013 at 13:08 UTC |
Back to
Seekers of Perl Wisdom