-
Notifications
You must be signed in to change notification settings - Fork 781
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
Reconnect issue after downtime - "Resource temporarily unavailable" #2286
Comments
Thanks for reporting and looking into this. I researched what can cause "Resource temporarily unavailable" and the pages I found mentioned sending data to a full buffer. That isn't the case here, but I could imagine not disposing broken sockets could cause this issue. Fixed here. |
We have meet this problem, but we can not ensure this issue of grpc. |
is there other reason may cause this:
|
What version of gRPC and what language are you using?
Grpc.Net.Client 2.56.0
What operating system (Linux, Windows,...) and version?
Debian 11
Linux --redacted-- 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux
What runtime / compiler are you using (e.g. .NET Core SDK version
dotnet --info
).NET 7, published ready to run - so not sure how to obtain this information.
What did you do?
We recently had a significant period of downtime where our networking was being migrated for 2 hours, and found that the
GrpcChannel
wasn't automatically reconnecting after the downtime ended.What did you expect to see?
Automatic reconnect.
What did you see instead?
We were seeing a strange error:
There aren't any issues with the network that I can see. I restarted the .NET application on one of the boxes running this code encountering this issue, and the issue was resolved.
This channel is being used very frequently, and throughout the downtime (and continuing after) would no doubt have created many calls to
TryConnectAsync
.My best guess is that this is some issue with creating too many
Socket
instances that are cleaned up too slowly? Looking through the code it looks like the created socket atgrpc-dotnet/src/Grpc.Net.Client/Balancer/Internal/SocketConnectivitySubchannelTransport.cs
Line 164 in 7e62218
This isn't an area I'm super familiar with, so a best guess from my side. Let me know if I can provide any more details.
Anything else we should know about your project / environment?
We create one channel for the lifetime of this application.
The text was updated successfully, but these errors were encountered: