formatc
formatc

Reputation: 4323

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. puts them off until connection is available.

Thanks in advance!

Upvotes: 3

Views: 742

Answers (2)

SliverNinja - MSFT
SliverNinja - MSFT

Reputation: 31651

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?

Upvotes: 1

s_nair
s_nair

Reputation: 812

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.

Upvotes: 0

Related Questions