简体   繁体   English

IIS7中的最大同时HttpRequests

[英]Maximum simultaneous HttpRequests in IIS7

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. 我在Asp.Net中编写了多线程应用程序,它做了大量的HttpRequests,有时在我看来,如果很多线程同时进行Http请求,我会得到更多的错误。我想知道是否有任何默认限制因为我在付费主机上托管这个应用程序,一次连接的数量,并且还想知道是否有任何限制,是否因为超出限制或是否有任何内部系统而试图发送请求失败的其他线程处理连接即。 puts them off until connection is available. 将它们关闭直到连接可用。

Thanks in advance! 提前致谢!

You can configure the DefaultConnectionLimit by address in the web.config 您可以在web.config中按地址配置DefaultConnectionLimit

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

You also should check the timeout for the web requests. 您还应该检查Web请求的超时。 What is the exception generated? 产生的异常是什么?

AFAIK, HTTP 1.1 server is limited to two connection wherein 1.0 server is limited to four connections. AFAIK,HTTP 1.1服务器限于两个连接,其中1.0服务器限于四个连接。 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. 因此,您可以检查从asp.net应用程序发送到HTTP / 1.1 / 1.0服务器的未完成/正在处理请求的数量。

This can declaratively altered through ServicePointManager.DefaultConnectionLimit = 5; 这可以通过ServicePointManager.DefaultConnectionLimit = 5声明性地改变; ( eg: 5 outstanding connections) (例如:5个未完成的连接)

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. 如果是这种情况,则值得检查您的请求限制(如果有)与提供商。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM