In my solution, I produce a lot of httpwebrequest through a proxy server. For 30 minutes, the receiving speed increases to 6-10 responses per second, after which the speed begins to gradually fall. When debugging, you can see that the speed of receiving data from the proxy (httpWebRequest.GetResponse ()) increases up to 15-20 seconds. While using a parallel proxy server in a browser, on the same resource, I get an answer in less than a second. I tried to change:
ServicePointManager.DefaultConnectionLimit, ServicePointManager.MaxServicePointIdleTime, httpWebRequest.ServicePoint.ConnectionLeaseTimeout, httpWebRequest.AllowReadStreamBuffering, httpWebRequest.KeepAlive. It brought no results.
I also noticed using Tcpview that in the browser a connection tcp would break in more than 60 seconds. While in my application the same process occurs within about 10 seconds. I suspect that this is most likely the problem. I am sure there are knowledgeable people here who can tell what the problem may be.
The solution is written in C # tested on Windows server 2012 using net framework 4.5