为什么 Azure Web 角色上的 IIS 需要如此频繁地重新编译 ASP.NET 应用程序?
我在许多不同的环境(AppHarbor、Azure、DiscountASP.NET、GoDaddy 等)上部署了 ASP.NET 应用程序,在 Azure 上部署时困扰我的一件事是我的低流量网站得到了 JIT-如果超过几个小时没有请求,则已完成。
显然,我可以通过增加网站的流量(我是在开玩笑)或尝试通过预编译做一些古怪的事情来解决这个问题,但我更愿意理解为什么网站需要在Azure中不断编译。我从来没有在其他低流量网站的提供商(甚至 GoDaddy)上注意到这个问题 - 这是否有某种原因,我可以在 Azure 配置文件中做些什么来阻止这个问题?
I have ASP.NET applications deployed on a number of different environments (AppHarbor, Azure, DiscountASP.NET, GoDaddy, etc...) and one thing that bothers me with my deployments on Azure is that my low-traffic websites get JIT-compliled if there hasn't been a request for more than a couple of hours.
Obviously I could solve this by increasing the amount of traffic to my site (I'm being facetious) or by trying to do some hacky things with precompilation, but I'd rather understand why the site needs to be compiled constantly in Azure. I've never noticed this issue on other providers (even GoDaddy) for low-traffic sites - is there some reason for this, and is there anything I can do in the Azure config files to stop this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Web 角色启动任务更改应用程序池超时设置。 Steve Marx 有一篇关于如何执行此操作的 帖子Azure。您可以使用远程桌面登录来更改此设置以进行验证 - 但该设置会在您下次部署时消失。
在其他环境中,应用程序池设置的配置可能有所不同。当我第一次设置 Azure 站点时,这个问题困扰了我一段时间。
Bump your app pool timeout settings with a web role startup task. Steve Marx has a post on how to do this in Azure. You can login with remote desktop to change this to verify - but that setting would get blown away next time you deploy.
On other environments, the app pool settings are probably configured differently. This bugged me for a while when I first set up my Azure site.