Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource temporarily unavailable #154

Open
haf opened this issue Oct 17, 2018 · 3 comments
Open

Resource temporarily unavailable #154

haf opened this issue Oct 17, 2018 · 3 comments

Comments

@haf
Copy link
Owner

haf commented Oct 17, 2018

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.
@CodeSwimBikeRunner
Copy link

We are getting this error as well.

@haf
Copy link
Owner Author

haf commented Oct 29, 2018

Http.fs should track this error and resend the request. PRs accepted.

@haf
Copy link
Owner Author

haf commented Nov 19, 2018

@ChristopherLClark Did you find out the cause for this? I have configured retries, but the error doesn't just disappear on its own without restarting the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants