Re: First Connection Open Slow from ASP.Net

From: Scott (no_email_at_all)
Date: 11/29/04


Date: Mon, 29 Nov 2004 10:39:07 -0600

Are you sure you have isolated this to the Sql Server connection itself?
First requests to aspx and asmx pages are always slower than subsequent
requests, regardless of whether there is a database connection being made.
Not knowing the structure of your pages and code modules makes it hard to
know for certain.

Scott L.

"Brian Mahloch" <anonymous@discussions.microsoft.com> wrote in message
news:8a1701c4d2f8$c7d25830$a401280a@phx.gbl...
> I created a simple windows form app that just opens the
> connection and then closes it, same as what I stripped the
> code down to in both by service and web page. From the
> windows app the first connection open is still longer that
> subsequent openings, but greatly reduced in time compared
> to the service or web page (2 - 5 seconds). To rule out
> machine hardware limitations I set up the database and
> service from server grade machines and noticed the same
> results. What's unfortunate is it's critical that I
> receive this information via a web service, however data
> will only be coming in at scheduled intervals which I
> can't guarantee to be similiar in time. This probably
> means the service will need to "reiniliation" often
> causing this delayed first connection opening.
>
> At this point there is so much invested I am willing to
> fight this "tooth and nail" to remedy. Any additional
> suggestions are welcome as I hope to provide updates as I
> come closer to resolve.
>
> >-----Original Message-----
> >Hi Brian,
> >
> >The speed of next connections is a feature of connection
> pooling I think.
> >Why the first connection is slow, who knows.
> >Did you try creating a simple (console) app that uses the
> same connection
> >string and run it on that machine?
> >
> >--
> >Miha Markic [MVP C#] - RightHand .NET consulting &
> development
> >SLODUG - Slovene Developer Users Group
> >www.rthand.com
> >
> >"Brian Mahloch" <mahloch@new.rr.com> wrote in message
> >news:03ec01c4d2a8$575fc790$7d02280a@phx.gbl...
> >> Strange situation here. Independent of data provider
> the
> >> very first connection my webservice or webpage (asp.net)
> >> makes to my sql server takes an unacceptable amount of
> >> time (30 seconds or longer). After the first one is
> >> established subsequent connections open instantly, until
> >> the service or site needs reloading. I cannot seem to
> >> track down any specific reason for this behavior.
> >> Connection string options, autentication mode, IP vs.
> >> Name, etc seem to have no or very little impact on this
> >> first connection opening. Any insight or suggestions
> >> would be greatly appreciated.
> >
> >
> >.
> >



Relevant Pages

  • Re: Timer gets stuck
    ... in the my connection to the POP service, but aren't the subsequent ... Canadian Mind Products, Roedy Green. ...
    (comp.lang.java.programmer)
  • Re: Java.net.SocketInputStream
    ... For the first read, it takes around 2 minutes, but for the subsequent ... In most cases the first responses are heavy and involves connection ... setup. ... The subsequent connections will reuse the connection hence are ...
    (comp.lang.java.programmer)
  • Re: Tcp concurrent connection limit in sp2
    ... TCP connection attempts. ... After the limit has been reached, subsequent ... connection attempts are put in a queue and will be resolved at a fixed rate. ... occur, a new event, with ID 4226, appears in the system's event log." ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Robby@Here.Now
    ... dialog in VS.NET IDE from the properties window to build the connection ... string for a SqlConnection object, the generated connection string will not ... SQL server connection. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: WLan Roaming & System.Data.SqlClient
    ... The connection should be persistent unless the network infrastructure ... chance, assigned a new IP address or one in a different subnet when you ... the scanners are associated to just ... If this happens the SQL server connection ...
    (microsoft.public.dotnet.framework.compactframework)