开发者

.NET Sites/Applications slow to load when not accessed for a while. Is it compiling? Or due to Idle Time-out setting in IIS?

This isn't a huge problem, but ideally i'd like to sort it out if possible. I'm assuming it's just the site compiling.

My sites are running under Server 2008 on IIS7.

I have some areas setup that only I use, control panels for example, which are .NET websites. For the sake of this example, the page in question is setup as it's own site in IIS.

If I don't visit this particular site for a while, then the first time I hit the page in a while, it takes a while to load... 开发者_如何学Pythonis this just the site compiling?

Am I right in thinking that the setting in IIS that says to kill the worker process after it's been idle for x minutes is the key to changing this?

The setting i'm talking about is on the App Pool that the site runs in, and is called "Idle Time Out". The default is set to 20 minutes.

Would increasing this stop the above from happening? And/Or would Pre-compiling do the same?

I can't actually pre-compile what's in question as it's a third party product. Just asking out of curiosity really.


Yes, increase the application pool idle timeout settings. This normally wouldn't be an issue unless you have little to no traffic for a given time period. Another option if the site is public is to use a service like pingdom to periodcly hit your site but I have not run into any issues by increasing the app pool timeout settings.

I believe this option is more useful for either people hosting a ton of sites or a shared hosting environment, allowing less frequently used sites / app pools to be unloaded from memory after a while. But if resources aren't an issue on your site, I always bump up the settings really high so the first response doesn't take 10-15+ settings while the precompilation / jit magic is happening.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜