Why does IIS7 take a long time

12,665

Solution 1

There are two ways that you can handle this.

  1. Modify the "Idle Timeout" value within the application pool. By default it will shutdown the application if there are no requests for 20 minutes

  2. If you are using ASP.NET 4.0 you can use the new Auto-Start behavior to keep the app "Always Running" you can see this blog post for examples on how to configure it.

Solution 2

The app pool goes to sleep basically because it has no new requests to process in a certain amount of time.

There is a plug-in for iis that can fix this:

IIS: Application Initialization Module for IIS 7.5

Works great for both new deployments and idle applications.

Share:
12,665
Roman
Author by

Roman

Updated on June 04, 2022

Comments

  • Roman
    Roman almost 2 years

    It looks likes if I don't visit my low traffic site for a day, it takes a long time for the first page to load. I believe it's probably because IIS7 shuts down the application when it receives no requests for a certain length of time.

    How can I stop this from happening?

    I have a dedicated server so I have all the access required to change things in IIS

  • Mitchel Sellers
    Mitchel Sellers over 13 years
    Great resource for the Application Warmup plug-in!
  • Roman
    Roman over 13 years
    can you change the "idle Timeout" such that the application pool doesn't timeout at all?
  • WooHoo
    WooHoo over 13 years
    You could try setting it to 0.
  • Mitchel Sellers
    Mitchel Sellers over 13 years
    You can "uncheck" the option to shutdown on idle timeout, or a value of 0 should also work