We have a page that makes a request to a 3’rd party web service. When under heavy load this response time extends significantly, however the 3’rd party reports back that there times for processing remains constant. There timings show that from the time they receive a request to the time they send it back is always around 1.5-2.0 seconds. Now we are experiencing wait times of over 20 seconds. My understanding of ASP.NET is that each request will run on a IIS thread pool thread and make the request to the 3’rd party service return and process. So I don’t really understand what could be blocking on our end. Is there something I am missing?? Is there a threshold limit beyond IIS that is blocking?
If I am missing something a physical book recommendation that covers this subject would also be a very welcome addition to any answer.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
.NET limits enforces a limit of 2 concurrent web requests to a single host as suggested by the HTTP specification. So in your case it’s not the web service that needs more time to execute, but your application delaying the requests to stay inside this constraint.
You can raise the limit for the web service by adding this key to your config file:
<system.net>
<connectionManagement>
<!-- specific servers... -->
<add address="http://example.org" maxconnection="20" />
<!-- ...or any server -->
<add address="*" maxconnection="8" />
</connectionManagement>
</system.net>
Method 2
You might want to read these for more information:
Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications
Performance Considerations for Making Web Service Calls from ASPX Pages
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0