Skip to content

Resource temporarily unavailable #154

@haf

Description

@haf
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) 

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 EAGAIN to be returned

Current idea of how to work around

  • Resend the request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions