Proxy icon indicating copy to clipboard operation
Proxy copied to clipboard

Connection Timeout on packets loss

Open SergeyRudakov opened this issue 9 years ago • 1 comments

Hello I'm using proxy on the azure VM connected to internal network via VPN. It works all right most of the time however periodically I experience TCP packet loss (with tcp retransmission) when sending POST request. This leads to TaskCancelledException (operation timed out) in the following line:

HttpResponseMessage responseMessage = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, context.RequestAborted);

I set HttpClient Timeout period to 15 minutes (which is more than necessary) but it seems when I start getting packet send problems following with (RST, ACK), connection stuck forever and terminates on timeout. Sometimes I have the same Timeout error after 15-20 seconds no matter that I set ReceiveHeadersTimeout and SendTimeout to 900 seconds.

I never see the same problem when I run proxy on local network. With VPN, about 2-5 POST requests of 100 are failed. I'm not sure if I will have the same problem on full .net 4.5.

SergeyRudakov avatar Mar 11 '17 01:03 SergeyRudakov

I experienced similar results with .net 4.5 proxy and direct website POST. I guess it is expected behavior to have timeout on DNS query (15 seconds) no matter what timeout is set for entire httpClient. Closing this issue.

SergeyRudakov avatar Mar 13 '17 22:03 SergeyRudakov