-
Notifications
You must be signed in to change notification settings - Fork 766
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
Support idle connection timeout with pending sockets #2213
Conversation
#2210 the issue behavior |
Why not? Kestrel has a default keep-alive timeout of 130 seconds. |
all right,i will test it |
We currently have 3 services in testing. On two of them, such an error occurs and they do not actively load the channel. Now about 1 error per hour. The third one is actively working with Grpc and there have been no such errors in the last 24 hours. This partly confirms what you're thinking @JamesNK . |
src/Grpc.Net.Client/Balancer/Internal/SocketConnectivitySubchannelTransport.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit on naming (this is a "consider", not a "please change"), but: LGTM
Fixes #2210
I think the issue is caused by a race when there is a long time interval between a channel connecting and a request being made:
The prospective fix is to close and recreate the socket if it exceeds the idle connection timeout. Default of 1 minute.