I run webapi on an Azure website that calls external web service calls. Webapi processes approximately 2K-3K requests per minute.
Periodically, many socket errors begin, indicating: "An attempt was made to access a socket that was denied by its access permissions." This error occurs regardless of the IP address of the external web service.
At first I thought it might be an ephemeral port depletion, but I limited the "connectionManagement" to 100 connections.
What could be the reason for this?
Thank you very much. We are pleased to provide any information that may be useful.
Update 6/1: - does not work on 6/2
I added the following to the web.config system.net section:
<defaultProxy enabled="false" useDefaultCredentials="false"> <proxy/> <bypasslist/> <module/> </defaultProxy>
This seems to have helped since I have not seen this problem in the last 6 hours. I have no idea why this will really help, since I do not use things related to proxies.
Any thoughts?
Update 6/2:
Adding the defaultProxy property doesn't really help. The problem is still happening. Return to the drawing board.
source share