IIS7 中的最大并发 HttpRequest 数

发布于 2024-12-11 17:00:02 字数 206 浏览 0 评论 0原文

我在 Asp.Net 中编写了执行大量 HttpRequest 的多线程应用程序,有时在我看来,如果很多线程同时执行 Http 请求,我会收到比平常更多的错误。我想知道是否有任何默认限制因为我在付费主机上托管此应用程序,所以一次连接数,并且还想知道是否有任何限制,尝试发送请求的其他线程是否由于超出限制而失败,或者是否有任何内部系统处理连接 IE。推迟它们直到连接可用。

提前致谢!

I wrote multithreaded application in Asp.Net that is doing alot of HttpRequests and sometimes it seems to me that if a lot of threads are doing Http requets at same time, I get more errors then usual.I was wondering if there is any default limit to number of connections at once since I am hosting this application at paid host, and also was wondering if there is any limit to this, are the other threads that are trying to send request failing because of limit being exceeded or is there any internal system that handle connction ie. puts them off until connection is available.

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水中月 2024-12-18 17:00:02

您可以通过 web.config 中的地址配置 DefaultConnectionLimit

<configuration>
  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="80"/>
    </connectionManagement>
  </system.net>
</configuration>

您还应该检查 Web 请求的超时。产生的异常是什么?

You can configure the DefaultConnectionLimit by address in the web.config

<configuration>
  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="80"/>
    </connectionManagement>
  </system.net>
</configuration>

You also should check the timeout for the web requests. What is the exception generated?

心如狂蝶 2024-12-18 17:00:02

AFAIK,HTTP 1.1 服务器仅限于两个连接,而 1.0 服务器仅限于四个连接。因此,您可以检查从 ASP.NET 应用程序发送到 HTTP/1.1/1.0 服务器的未完成/正在处理的请求数。

这可以通过 ServicePointManager.DefaultConnectionLimit 进行声明性更改 = 5; (例如:5个未完成的连接)

此外,您还提到它是付费主机。如果是这种情况,则值得向提供商检查您的请求限制(如果有)。

AFAIK, HTTP 1.1 server is limited to two connection wherein 1.0 server is limited to four connections. Therefore you can check how many outstanding/in process requests to an HTTP/1.1/1.0 server that you send from your asp.net app.

This can declaratively altered through ServicePointManager.DefaultConnectionLimit = 5; ( eg: 5 outstanding connections)

In addition, you also mentioned it's a paid host. If that is the case, it’s worth checking your request limit (if any) with the provider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文