Skip to Content.
Sympa Menu

freetds - RE: [freetds] Plagued by random "Connection Refused"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "warhau" <warhau AT austin.rr.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Plagued by random "Connection Refused"
  • Date: Tue, 27 Apr 2004 02:43:43 -0500

Thanks. My SQL server is supposed to be able to handle 32K connections by
default, isn't it?

Scripts shouldn't overlapping because I have some detection code to note
that the previous one is running. Question though, should it matter if cron
does overlap the processes as far as TDS is concerned? I would think that
each run time of the script would get a separate copy of all the database
stuff. It obviously wouldn't be nice to have 4 versions of the same script
doing the same work at the same time, but would it cause "connection
refused"?

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Andy Cranston
Sent: Tuesday, April 27, 2004 2:26 AM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] Plagued by random "Connection Refused"

If your cron processes start to take 60 seconds or more to complete then
cron will start to overlap the processes. This could be one source of the
problem.

Another issue might be the number of concurrent connection requests the
server can handle. Instead of having twelve seperate cron entries running
every minute (that is my understanding of your config - if not could you
post a copy of your crontab file) have one entry that calls a shell script
to call each of the twelve processes in sequence. Process two only starts
when process one has completed, process three only starts when process two
has completed etc. You could also add a check to see if the previous
invocation 60 seconds ago is still running. You may want this minutes
invocation to skip when this happens.

Just some ideas. Hope this helps.

Regards,

Andy Cranston.

-----Original Message-----
From: warhau [mailto:warhau AT austin.rr.com]
Sent: 27 April 2004 06:32
To: FreeTDS AT lists.ibiblio.org
Subject: [freetds] Plagued by random "Connection Refused"


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: 172.31.132.34:5197: Connection refused

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





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;



------

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds

________________________________________________________________________
This message has been checked for all known viruses by the Selway Moore
scanning service powered by MessageLabs. For further information and
statistics on current viruses visit http://www.messagelabs.com/stats.asp
________________________________________________________________________

________________________________________________________________________
This message has been checked for all known viruses by the Selway Moore
scanning service powered by MessageLabs. For further information and
statistics on current viruses visit http://www.messagelabs.com/stats.asp
________________________________________________________________________
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page