asp.net - 当匿名用户数达到 10 时 IIS 挂起

标签 asp.net performance wcf iis

我的 ASP.net 站点有时会挂起很长时间。

我需要帮助来了解发生这种情况的原因以及是否可以通过更改某些 IIS 设置来解决问题。 站点托管在 IIS 7.5 Window 7 x64 上。

我从性能监视器中收集了一些信息: enter image description here

当负载高且匿名用户数量达到 10(这将成为 Windows 7 的限制)时,站点将停止响应客户端请求约 1.5 分钟。在停机期间打开的连接数不断增长。在某个时候服务器突然变得活跃并响应所有未决请求。 CPU 使用率不超过 50%,并且有足够的空闲内存。尝试在另一台计算机上重现该情况,但未成功。

您是否知道此类 IIS 停机的原因?

UPD

我已经给 Windows 打了补丁,现在它允许超过 10 个连接,但问题仍然存在。在挂起期间,即使是对静态 html 页面的简单获取请求也不起作用,因此它似乎与 IIS 有关,而不是与应用程序行为有关。

最佳答案

参见 IIS limits imposed by Operating System version

Windows 7 (IIS v7.5)2  
Starter:        No IIS  
Home Basic:     No IIS  
Home Premium:   simultaneous request execution limit of 3, allows multiple sites  
Business:       simultaneous request execution limit of 10, allows multiple sites  
Enterprise:     simultaneous request execution limit of 10, allows multiple sites  
Ultimate:       simultaneous request execution limit of 10, allows multiple sites  

还有 Windows Vista/7 IIS Concurrent Connection Limits

Instead of blocking the HTTP connections above the maximum number of connections limited in IIS 6, IIS 7 will now queue any new requests, an allow limited number of concurrent connections at the same time.

如果您想使用 IIS 处理超过 10 个并发连接,您需要使用服务器操作系统 - 这些操作系统对并发连接数没有限制。

也就是说,这本身并不能解释为什么 Requests/Sec 为 0(IIS 应该仍在处理请求,只是并发不超过 10 个)。我的猜测是您的 ASP.Net 应用程序有某种问题导致它停止处理请求(例如数据库锁定)。结果将是越来越多的连接排队,直到所有 10 个当前连接都卡在等待同一事物并且服务器完全停止处理请求 - 简而言之,并发连接似乎是一种症状,而不是原始原因。

关于asp.net - 当匿名用户数达到 10 时 IIS 挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20883933/

相关文章:

WCF REST 与 Windows Phone 通信

c# - ASP.NET MVC 5 Bootstrap Accordion 无法正常工作

c# - 在运行时在服务器端在 C# 中查找 div

performance - 本地 IPC 的平均性能测量

Jquery if else 语句性能

wcf - AddressAccessDeniedException "Your process does not have access rights to this namespace"单元测试 WCF 服务时

c# - 没有管理权限的本地主机上的自托管 REST API

c# - WebMethod 未被调用。 ASP.NET C#

asp.net - 如何在Gridview中添加标题和副标题

c# - StringBuilder 中最快的搜索方法