Re: SqlCommand Open VERY slow on application load

From: B B (BB_at_discussions.microsoft.com)
Date: 02/08/05


Date: Mon, 7 Feb 2005 17:15:01 -0800

Hey, don't give up on me everybody! I still haven't solved this! Does
anyone have any other suggestions? Does anyone from MS actually monitor this
group?

"B B" wrote:

> Thanks for your post, Andre. I would buy Kevin's theory if I didn't have two
> other comparably fast machines that did not experience this delay at all -
> and if one of them weren't connecting twice as fast over a 512Kbps vpn.
>
> Profiler: The profiler is empty for the entire 45 seconds, and finally ends
> up with a login message right at the end when it connects - as if it's having
> trouble even opening the socket.
>
> The delay was the same when we did not explicitly open the connection The
> only reason we explicitly put the 'open' in was the narrow down the slowness.
> Getting rid of it only moves the slow speed to the first command that
> actually fetches data.
>
> My next step - that I am not looking forward to - is to run ethereal and try
> to monitor packets. But the most reliable way to do that is to form a mini
> subnet on a hub (not a switch) and monitor with a 3rd computer; hubs are hard
> to find these days.
>
> I remember reading somewhere that there is some sort of default login
> timeout of 45 seconds that can be configured - does anyone know what this
> might be?
>
> Thanks again for your help,
>
> Brian
>
> "Andre Ranieri" wrote:
>
> > I have to think that 45 seconds to create a SqlConnection is not a normal
> > thing, even for managed code like .NET.
> >
> > If you run SQL Profiler, do you start seeing the log fill up as soon as you
> > F11 step into the conn.Open() line or does the Profile log sit empty for the
> > 45 seconds and fill at the end? How about memory usage on your laptop? does
> > it hit the roof when it hits this line? I'm guessing it doesn't.
> >
> > I'm running a very similar situation, 2.4GHz Pentium IV 2.4 notebook w/ 1 mb
> > memory, currently developing an ASP.NET app that includes web.config
> > connection strings to two separate SQL 2000 servers. I'm not seeing any
> > noticable delay when creating, instantiating and opening a SQLConnection
> > object.
> >
> > One last point of curiosity: it looks like your first call to the database
> > is through a SqLCommand to a datareader of something like that. What if your
> > first call is to fill a dataset using a data adapter? I know a da
> > automatically handles connection state for the connection, maybe that would
> > be faster?



Relevant Pages

  • Re: SqlCommand Open VERY slow on application load
    ... other comparably fast machines that did not experience this delay at all - ... Profiler: The profiler is empty for the entire 45 seconds, ... The delay was the same when we did not explicitly open the connection The ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A crazy idea....
    ... they'll be built into every monitor we buy. ... If Canada, a country with fewer people than the ... Is that why I had to get a satellite high speed connection and Aliant told me we'll never begetting high speed, ... So God is totally out of the picture, and humans are the accidental product of a purposeless universe. ...
    (comp.sys.mac.advocacy)
  • Re: Commodore 1084s RGB Cable Question.
    ... >> maybe the RGB connector on the monitor is duff, ... If the V sync is interrupted, ... an internal ground connection to the ... > front control panel may have opened up. ...
    (comp.sys.cbm)
  • Re: Semaphores and .NET
    ... Change the monitor to a named mutex and use a mem mapped file to hold the ... > app. ... it cannot hangup the connection. ... >>> Lead Project Software Engineer ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: tcp hostcache and ip fastforward for review
    ... It would probably break or delay many things. ... This is an unlikely case (many small packets sent to a non-interactive ... > for minmss it will reset and drop the connection. ... which is unfortunate. ...
    (freebsd-current)