[ACCEPTED]-Slow first page load on asp.net site-iis
The IIS application pool is shut down after 6 30 minutes of inactivity. After that, when 5 you make a request IIS basically has to 4 start the website up again, which leads 3 to the behavior you are describing. You 2 can change the idle time of your website 1 in iis though to avoid it.
You could also look into the Auto-Start feature of 1 the 4.0 framework.
If you're using IIS 7 there is an IIS plugin 4 call Application Warm Up that will help
I've 3 written a blog post about my experiences 2 using it here (don't know if i'm allowed 1 to post to my own content?):
You can schedule the recycling of the application 3 pool, possibly using a warm-up script. Give 2 it its own application pool first and see 1 if that helps.
Futhering the answers that noted IIS will 14 shut down an idle, as your site comes back 13 up your Application.OnStart will fire (within 12 your global.asa) If you are doing a lot 11 of work here this may slow your application. Other 10 things going on all your caches will be 9 empty, all your DB connection will be disconnected.
This 8 behaviour is configurable in IIS, if you 7 do not have access to the IIS settings a 6 hacky way around this is to hit your site 5 every 10 minites either from a script or 4 a special page that has a meta refresh.
Your 3 other option is to accept that the first 2 page hit of the day will take a few seconds 1 longer then usal.
I've encountered the same problem in the 3 past. I never managed to get to bottom of 2 the problem, but I suspected that the IIS 1 application pools were the culprit.
More Related questions