.NET Calling Web Services: Look Out For The “connectionManagement/maxconnections” Setting

If you have an application making web service calls in parallel, you will want to change the maxconnection setting. By default, you will be limited to 2 concurrent connections per endpoint, so even you had 20 threads going, they would all be throttled down waiting on the 2 slots available for the request/response calls.

Here’s a bit more information about this constraint:

From Microsoft Support,
Contention, poor performance, and deadlocks when you make calls to Web services from an ASP.NET application
“The maxconnection parameter determines how many connections can be made to a specific IP address.”
“By default, because this setting applies to the AppDomain level, you can create a maximum of two connections to a specific IP address from each AppDomain in your process.”

From MSDN, Element (Network Settings)
“The connectionManagement element defines the maximum number of connections to a server or group of servers.”

Hope this helps!

This entry was posted in ASP.Net, C#, Web Services. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *