views:

33

answers:

2

An ASP.NET webpage will take maybe 10 seconds or so the first time the page is loaded, which is understandable since stuff is getting JIT'ed and app domains being loaded, etc. The next requests take only half a second or so. However, if no one hits the site for a few hours, the first request after such a period of inactivity will take 10 or 20 seconds again.

It's as if IIS gets bored and unloads a bunch of crap. How do I get it to not do this? I want the site to always be fast, even if I don't get a lot of traffic.

This is a dedicated web server, there are no users logged on and no other user-mode applications running. The's several gigs of memory available so nothing should be paged out to disk.

+2  A: 

You can change the idle timeout settings.

Brad
That's the wrong timeout.
SLaks
@SLaks, I updated my answer.
Brad
That was it! I set it to 2 days. If IIS were smart it would say "I see your site isn't too popular, would you like to visit Bing WebMaster Tools?"
Mike
A: 

Have a look at the IIS7 application warmup extension.

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

Bronumski
That could be useful, providing the "warm-up" runs on recycled idle worker processes as well.. For now, I will just set the idle timeout to 2 days and call it good.
Mike