固定的IIS缓慢的初始负荷 [英] Fixing slow initial load for IIS

查看:175
本文介绍了固定的IIS缓慢的初始负荷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IIS有低流量的网站一个恼人的功能,在其未使用的回收工作进程,导致第一个用户到该网站后一段时间才能得到一个非常长的延迟(30+秒)。

IIS has an annoying feature for low traffic websites where it recycles unused worker processes, causing the first user to the site after some time to get an extremely long delay (30+ seconds).

我一直在寻找一个解决问题的办法,我已经找到了这些潜在的解决方案。

I've been looking for a solution to the problem and I've found these potential solutions.

一个。 使用应用程序初始化插件

乙。 <一href="http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx">Use自动启动与.NET 4

℃。 禁用空闲超时时间(在IIS重置)

Ð。 precompile的网站

我不知道其中哪些是preferred,更重要的是,为什么有这么多的解决方案,以同样的问题? (我的猜测是,他们都没有了,我只是不理解的东西正确的)。

I'm wondering which of these is preferred, and more importantly, why are there so many solutions to the same problem? (My guess is they aren't, and I'm just not understanding something correctly).

修改

执行 C 似乎是足以让我的网站回暖,但我发现我的网站的缓慢的真正根源,是因为有实体框架,我似乎无法弄清楚为什么它会冷。请参见这个的问题,其中可惜一直没有得到解答已经回答了!

Performing C seems to be enough to keep my site warmed up, but I've discovered that the real root of my site's slowness has to do with Entity Framework, which I can't seem to figure out why it's going cold. See this question, which unfortunately hasn't been answered yet has been answered!

我最终只是不得不做出<一个href="http://social.technet.microsoft.com/wiki/contents/articles/4641.write-an-iis-warm-up-script-for-a-sharepoint-intranet-site-en-us.aspx">warm up脚本来打我的网站偶尔,以确保它留快捷。

I eventually just had to make a warm up script to hit my site occasionally to make sure it stayed speedy.

推荐答案

选项A,B和D似乎是在同一类,因为它们不仅影响了最初的起始时间,他们做网站的热身一样编译和加载在内存库。

Options A, B and D seem to be in the same category since they only influence the initial start time, they do warmup of the website like compilation and loading of libraries in memory.

使用C,设置空闲超时时间,应该足够,以便后续请求到服务器供应快速(重新启动应用程序池需要相当长的时间 - 以秒计)。

Using C, setting the idle timeout, should be enough so that subsequent requests to the server are served fast (restarting the app pool takes quite some time - in the order of seconds).

据我所知,超时的存在是为了节省内存的机器上运行并行的其他网站可能需要。价格是一个时间慢加载时间。

As far as I know, the timeout exists to save memory that other websites running in parallel on that machine might need. The price being that one time slow load time.

此外,该应用程序池获取用户的情况下闲置关机事实上,应用程序池也将在默认情况下每隔回收1740分钟(29小时)。

Besides the fact that the app pool gets shutdown in case of user inactivity, the app pool will also recycle by default every 1740 minutes (29 hours).

从的TechNet:

Internet信息服务(IIS)应用程序池可   周期性地再循环到避免不稳定的状态,可导致   应用程序崩溃,挂起,或内存泄漏。

Internet Information Services (IIS) application pools can be periodically recycled to avoid unstable states that can lead to application crashes, hangs, or memory leaks.

只要应用程序池回收留在,它应该是足够了。 但是,如果你真的想大多数部件的顶尖性能,你也应该使用类似你提到的应用程序初始化模块。

As long as app pool recycling is left on, it should be enough. But if you really want top notch performance for most components, you should also use something like the Application Initialization Module you mentioned.

这篇关于固定的IIS缓慢的初始负荷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆