Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- From: "Ian Boyd" <ian.msnews010@xxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 14:12:09 -0500
Just to be sure we're on the same page: the ConnectionTimeout "clock"
starts when the network services find the database server on the network
and provides a handle to the connection object. From what I've read, the
developer has no control over how long the network services take to find
and deliver the handle to the database server.
How are you forcing the timeouts to occur for your testing? And how are
you determining the point at which to start timing the "Actual Timeout"
period?
i am starting the clock just before i call Connection.Open.
The server i am giving the ADO Connection object is a valid, fully
qualified, name of a workstation machine on the network that is not running
SQL Server. i intentionally give it a valid name (as opposed to an invalid
server name, such as "asdfadf"), so that i can eliminate the delay of DNS
resolving and so it can get right on with TCP connection build-up.
The connection is happening asynchronously, and i stop the clock as soon as
the "ConnectComplete" event fires (even though it didn't connection, and the
connection complete event shows errors). The same problem appears if you
use a synchronous connect, and call:
t1 = GetTickCount;
Connection.Open(...)
t2 = GetTickCount;
Total Time = t2-t1;
For the fun of it, i changed it from a fully qualified DNS name to use an IP
address (hoping to avoid any of those costly delays of resolving dns from my
local machine's cache), and the average connect time dropped by 0.1seconds:
Desired Timeout Actual Timeout
1sec 2135ms (stdev=127ms)
2sec 3161ms (stdev=85ms)
5sec 6161ms (stdev=9ms)
10sec 11390ms (stdev=920ms)
Average "over" time DNS: 1377ms (stdev 319ms)
Average "over" time IP: 1212ms (stdev 120ms)
It's not a statistically significant difference, but i can say with 95%
confidence that: 2.2s > 1s
i am also connecting using SQL Server authentication (in the hoping of
eliminating any pesky domain controll kerberos challenge hit). Of course
non of that matters, since 1s should be 1s - no matter what ADO has to wait
on.
Original question stands.
.
- Follow-Ups:
- Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- From: Bob Barrows [MVP]
- Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- References:
- ADO ConnectionTimeout taking 2.3s rather than 1.0s
- From: Ian Boyd
- Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- From: Bob Barrows [MVP]
- ADO ConnectionTimeout taking 2.3s rather than 1.0s
- Prev by Date: Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- Next by Date: Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- Previous by thread: Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- Next by thread: Re: ADO ConnectionTimeout taking 2.3s rather than 1.0s
- Index(es):
Relevant Pages
|
|