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 Sweeney <michael at IS dot CO dot ZA>
Subject: Closing a database connection
Date: Oct 14 1999 8:49PM

Hi,

I have a perl process that processes a continuous datafeed and inserts
data into a Sybase database as it arrives. The inserts are done by calling
stored procedures in the database using sybperl. Every few days my process
will start hanging. I have done some debugging using strace on both the
dabase server and on my process and it appears to be a problem in the
database. When a hang occurs it seems that after the stored procedure
call, the database doesnt return anything to the client application and
my process is left hanging in a select.

A colleague has suggested putting a SIGALRM handler into my client
application to close and then reopen the database connection if a hang
occurs. Problem is I am using CTlib and have not been able to find an
explicit way of closing the connection. Is there any easy way to close a
connection?

Setup Information:
I am currently using Sybase 11.0.3.3 for Linux so there is no support
available from Sybase. My application program running on a Linux box with
kernel 2.2.5, Perl 5.005_02 and sybperl 2.10. 

Regards