ASP.NET 2.0-4.0 Web Applications experiencing extremely slow initial start-up.

后端 未结 3 1425
名媛妹妹
名媛妹妹 2021-01-01 15:55

(Sorry if this is a really long question, it said to be specific)

The company I work for has a number of sites, which have been running for some time with no problem

相关标签:
3条回答
  • 2021-01-01 16:12

    With IIS not respecting recycling settings: did restarting IIS/rebooting change the behavior?

    0 讨论(0)
  • 2021-01-01 16:18

    I would advise using a non-tcp connection if you are still running the SQL instance on the local machine. SQL Server supports several protocols, tcp, named pipes, and shared memory are the more common.

    Named Pipes

    Data Source=np:computer\instance
    

    Shared Memory

    Data Source=lpc:computer\instance
    

    Personally I prefer the Shared Memory. Remember you need to enable these protocols, and to avoid configuration mistakes I suggest you disable all you are not using.

    see http://msdn.microsoft.com/en-us/library/ms187892.aspx

    IIS Reset

    In IIS7 there are two ways to configure the idle-timeout. Both begin by clicking on the "Application Pools" section and right-clicking the appropriate app domain. If you click the "Recycling..." option there is one setting. The other is in "Advanced Settings..." under the section for "Process Model" you will find "Idle Time-out (minutes)" which set to zero disables the process timeout. This later option is the one that works for us.

    If I were you I'd solve this problem first as restarting the appdomain and/or worker process is always painful even if you don't have a 20 second lag.

    0 讨论(0)
  • 2021-01-01 16:24

    Some ideas:

    • from the web server, can you ping the db server and get a "normal" response, or are you seeing a similar delay?
    • if you're seeing a delay, run a tracert to see if you can nail down where the slowness is occurring
    • try using a tool like QueryExpress (http://www.albahari.com/queryexpress.aspx) which doesn't require an install to run. You can download this EXE and run it from your web server. See if you can connect to your db using this and run queries in a normal fashion.
    • Try something like SysInternals' TcpView (http://technet.microsoft.com/en-us/sysinternals/bb897437) to take a look at your open connections and see what activity is happening on your server and how much data is being sent to and received from your db server.

    Just some initial thoughts on where I'd start to look based upon your problem description. I hope this helps. Good luck with things!

    0 讨论(0)
提交回复
热议问题