Recently, we have a case that asp.net will consume the backend web service. We found the bottleneck was caused by the maxconnection to the remote web service.
We changed the maxconnection setting like below by following the KB821268 of old version:
The maxconnection parameter determines how many connections can be made to a specific IP address. The parameter appears as follows:
<add address="*" maxconnection="2">
<add address="18.104.22.168" maxconnection="300">
The settings for the parameters that are discussed earlier in this article are all at the process level. However, the maxconnection parameter setting applies to the AppDomain level. 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.
NOTE: before this, we already disabled autofig of processModel in machine.config
Unfortunately, we found that above configuration doesn’t take effect at all : the maxconnection is always 10.
1. Actually the format of address like below mentioned in old KB article 821268 is inaccurate:
The address schema of maxconnection should be like below:
Http(s)://<IP address or Server Name>:<Non_Default_Port>
For example, below are some qualified addresses:
2. As a prerequisite, Please do remember to disable autoConfig in machine.config as below:
… <processModel autoConfig="false"/> …
3. At the same time, KB 821268 of old version is modified already:
b) Description of updated version:
<add address="http://22.214.171.124" maxconnection="12">
If the application's code references the application by hostname instead of IP address, the parameter should appear as follows:
<add address="http://hostname" maxconnection="12">
Finally, if the application is hosted on a port other than 80, the parameter has to include the non-standard port in the URI, similar to the following:
<add address="http://hostname:8080" maxconnection="12">