-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
System.AggregateException: One or more errors occurred. (Resource temporarily unavailable) ---> System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException: Resource temporarily unavailable
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at HttpFs.Client.getResponseOrFail@974[a,b](FSharpChoice`2 _arg1)
at Hopac.Core.ContMap`2.DoCont(Worker& wr, X x)
at Hopac.Core.Worker.RunOnThisThread(Scheduler sr, Work work)
- https://stackoverflow.com/questions/14370489/what-can-cause-a-resource-temporarily-unavailable-on-sock-send-command
- https://stackoverflow.com/questions/11178220/is-httpclient-safe-to-use-concurrently
- https://stackoverflow.com/a/7635520/63621
- https://github.com/dotnet/corefx/issues/30623#issuecomment-399757684
- http://byterot.blogspot.com/2016/07/singleton-httpclient-dns.html
Consider setting ConnectionLeaseTimeout in order to re-resolve DNS in order to combat the possible error that the kernel is already pending many other HTTP Client connections to the same IP.
Hypothesis:
- Multiple ongoing connection attempts to a server that is not accepting connections
- The server is accepting connections but immediately RST-ing them, causing the kernel .net core is running on to return EAGAIN back from
send/connect - There's an implicit timeout in the .net core framework that triggers
EAGAINto be returned
Current idea of how to work around
- Resend the request.
Metadata
Metadata
Assignees
Labels
No labels