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