[freetds] Plagued by random "Connection Refused"

warhau warhau at austin.rr.com
Tue Apr 27 01:32:27 EDT 2004

I am running 12 separate cron processes per minute which all connect to the
same db to do different things. Unreproducably, but regularly, I get


src/tds/login.c: tds_connect: Connection refused

OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (41)
Server myserver, database Message String: Server is unavailable or does not



The rest of the processes normally succeed without a problem. Some times
there are 5 out of 12 of these failures in one minute. Some times there is
30 minutes in between. 


Specs below. Any help on how to troubleshoot this is much appreciated.



FreeTDS and db machine are in the same rack on the same subnet. 

No load on db.

Db freshly rebooted. 

Separate interface in machine tried with separate route port, cable, etc.
with same effect


FreeTDS version 0.61.2

MSSQL 2000

DBI 1.42

DBD-Sybase 1.02


Actual connect code which prints the error above




my (%config);

use DBI;


$ENV{SYBASE} = "/usr/local/etc/";         


$config{'dbdriver'} = "Sybase";

$config{'dbserver'} = "myserver";

$config{'dbuser'} = "myuser";

$config{'dbpass'} = "mypass";


my $dbh = DBI->connect("dbi:$config{'dbdriver'}:server=$config{'dbserver'}",
$config{'dbuser'}, $config{'dbpass'}, {PrintError => 0}) 

            or print $DBI::errstr;


$dbh->{'Warn'} = 0;



More information about the FreeTDS mailing list