views:

56

answers:

3

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

+2  A: 

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.

Mitchel Sellers
@MitchelSellers, can you change the "idle Timeout" such that the application pool doesn't timeout at all?
Am
You could try setting it to 0.
Tigger
You can "uncheck" the option to shutdown on idle timeout, or a value of 0 should also work
Mitchel Sellers
+2  A: 

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:

http://www.iis.net/download/ApplicationWarmUp

works great for both new deployments and idle applications.

Climber104
Great resource for the Application Warmup plug-in!
Mitchel Sellers
A: 

Hi Am, Take a look at the application pool, check the advanced settings->process model->idle timeout (minutes). Set this higher than 20 mins. Sounds like the worker process is shutting down because its idle.

http://technet.microsoft.com/en-us/library/cc771956(WS.10).aspx

Cheers tigger

Tigger