Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Hang up
Date: Oct 12 1999 12:33AM

SA Lim writes:
 > Hi,
 > Every time our SA does a weekly maintenance of the database, my
 > CGI program which normally takes less than 10 seconds to return,
 > would timeout after 2 minutes at the following code. Is there any
 > way to re-write the code to prevent this?
 > I'm running Sybperl 2.09_04 on Solaris 2.6.
 >   $dbh->ct_execute("$sql_query");
 >   while ($dbh->ct_results($restype) == CS_SUCCEED) {
 >     next unless $dbh->ct_fetchable($restype);
 >     while (@row = $dbh->ct_fetch) {
 >      (do something)
 >     }
 >   }

I guess that your DBA does some DBCC checks or something similar that
locks one or more tables that you need access to when your CGI runs. 
There isn't really anything that you can do about that, apart from
playing with the "timeout" values (see ct_options() in the Sybase
OpenClient manual for a description on how to set the login timeout
and the "request" timeout).

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: