PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
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
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com