-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The connection is not reconnected after disconnection #1254
Comments
I've managed to get around the hanging connection issue by setting the |
+1 for this. The grpc-go library |
Agreed this is an issue for us as well. Would be really great if the connection re-established itself. |
I'm dealing with this issue as well. Is there anyway to work around it? |
This PR add the auto reconnect implementation for curp client, as a workaround for hyperium/tonic#1254. Signed-off-by: bsbds <[email protected]>
This PR add the auto reconnect implementation for curp client, as a workaround for hyperium/tonic#1254. Signed-off-by: bsbds <[email protected]>
According to this change: #452, when using @n1ght-hunter how are you forcing the connection to stay open? By setting the |
When using lazy connect in combination with keepalive, it currently reconnects automatically after the keepalive timeout. However, between the network change and the keepalive timeout any request will hang until the keepalive timeout is hit. Requests will then fail with a transport error with timeout. It would be great if somehow the connection could be reestablished directly after the network change, rather than having to wait for the timeout there. This causes all clients with unreliable internet connections (think mobile) to have to implement retry logic based on timeouts, which greatly increases latency. |
This PR add the auto reconnect implementation for curp client, as a workaround for hyperium/tonic#1254. Signed-off-by: bsbds <[email protected]>
This PR add the auto reconnect implementation for curp client, as a workaround for hyperium/tonic#1254. Signed-off-by: bsbds <[email protected]>
This PR add the auto reconnect implementation for curp client, as a workaround for hyperium/tonic#1254. Signed-off-by: bsbds <[email protected]>
Bug Report
The connection does not know how to recover on its own in the event of a break. (Sometimes it can, most often the connection freezes after disconnecting)
Version 0.8.3
Platform
Linux Home-PC 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Crates
Description
If the connection between the client and the server is lost. He can no longer restore it and the program that uses the client no longer works. For example, when you sleep for a long time or physically disconnect from the server.
Further use of the grpc service is impossible, just a timeout error or a broken connection.
or this
I encountered this problem on the working program in the finished product. To study it I created a simple server-client on from the tonic examples
And I get the same errors.
I run the server on a remote machine, that it would be possible to physically break the connection between the client and the server.
Server
Client
I have tried several settings. For example, if use .http2_keep_alive_interval(Duration::from_secs(5)) then the connection does not break during idle time. But if you physically break the connection, then it can no longer be restored (Sometimes the tonic reconnects itself, but most often the connection just hangs).
Perhaps I need to specify some other settings so that a new connection is established when it breaks?
The text was updated successfully, but these errors were encountered: