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 dot peppler at bnpparibas dot com
Subject: Re: DBD::Sybase with host process disconnect errors when run from linux
Date: Oct 4 2006 12:31PM

This error usually happens when the client goes away without properly 
closing the connection.
You may be getting this because of a tcp_keepalive setting that is too low 
on the db server side.

What happens when you connect from the linux host with isql and issue the 
same query?


Internet - 03.10.2006 20:22
Sent by:
To:     sybperl-l
Subject:        DBD::Sybase with host process disconnect errors when run 
from linux

Has anyone come across this problem?  Any help would be appreciated (it's 
driving me bananas).  When I run a simple connect to a sybase server from 
a linux box, the connect creates a "host process disconnect" message in 
the Sybase error log.  When I run the same script on a sun solaris box, no 
message in the Sybase errorlog.  Do you think upgrading it to the latest 
DBD version would help?



Script runs from linux box with DBD::sybase,,v 1.4, linux 
version Linux 2.4.21-27.0.2.ELsmp #1 SMP 
Connects to Sybase 12.5.2 ESD2, running on Sun solaris 2.8 


my $dbh = DBI->connect("dbi:Sybase:server=$status_server", $login, 
$password, {PrintError => 1}); 

if ($dbh) { 
   $query = "select xyz from db..table where status = 0"; 
   $hash = $dbh->selectall_hashref($query, "server_name"); 

   while (my ($k, $v) = each(%$hash)){ 
   print "$k => $v\n"; 

Sybase error log: (this only happens during the "DBI-> connect" command) 

1st time running script 
01:00000:02914:2006/10/03 12:55:02.92 kernel  Cannot read, host process 
disconnected: 37876 spid: 2914

2nd time running script 
01:00000:02178:2006/10/03 12:55:03.07 kernel  Cannot read, host process 
disconnected: 37876 spid: 2178

Notes:  The code returns valid results from both linux and sun; it's just 
those darn messages in the errorlog that is making the errorlog grow 
waaaaaay too much. 

This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 


Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.