First request is very slow after website sits idle with Asp.net mvc IIS6

 ̄綄美尐妖づ 提交于 2019-12-03 00:48:34

You are probably a victim of worker process recycling. Ask your host how often the worker processes are recyled.

When a worker process is recycled, it has to recompile and restart the entire web application, and that's what causes the slowdown.

This is natural.

IIS is often configured to shut down the website if it's a certain age or if there hasn't been a request in awhile. Your website has to be loaded (and possibly compiled) when the first request comes after asp.net has been shut down by IIS.

The common solution is to precompile your website before publishing it to the server.

Just a guess, but perhaps you are caching some data, that needs to be refreshed after the site has been idle for some time ?

If this is not the case, then my guess would be that the worker process has been shut down for some reason (it could be for some other reason than the idle timeout in IIS). If you need to check whether this might be the case, you could add some code to the Application_Start event that logs the startup event to a file or whatever logging you have in place. After some time in operation, you can examine the logs and see, how many Application_Start events has occured.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!