-
Notifications
You must be signed in to change notification settings - Fork 82
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
Stream connection hanging forever #463
Comments
Thanks for raising this, Jean Pierre. Stream termination with a proxy in between can be tricky. Just hanging forever is not acceptable. Yes I'm sure we will be able to provide a fix for this. |
yes I'm using @bufbuild/connect-node over http2 |
@jeanp413, it took a while, but this should be addressed by #619. There was a straight-forward bug in the client implementation that caused connections that unexpectedly ended to hang. We do not send HTTP/2 PING frames to keep the session alive, but it seems that your issue is likely the bug, not the keep alive. In case you do still experience an issue after this is released, let us know. |
hey @timostamm just gave a quick try from sources and still can repro, but seems that the issue is not related to the proxy I mention initially, the thing is my stream service does not sent data continuously only when some event happens, so it could be that it doesn't send any data for 10 min but after that time the socket is not responsive anymore and the async iterator hangs forever, found this stackoverflow question that mentions sending keepalive pings too |
Thanks for testing it, @jeanp413! I'm surprised to hear that it's still happening. Could you share some information about the server and your deployment? I have created #627 specifically for HTTP/2 PING frames, and will leave this issue closed. We're currently adding client-side deadlines, so that a timeout always aborts the request without relying on the server to close. This should also help to deal with such an issue, although I'm aware it doesn't replace actively monitoring the connection. |
I forgot to mention: Talking about HTTP/2 ping to others, I've also heard about issues with especially in combination with proxies that might terminate ack the pings for your client, while your upstream connection dies due to idle. They are not a silver bullet either. |
Awesome, will try it out early next week, thanks 🎉 |
Describe the bug
I have a stream service in a server behind a proxy that has a timeout of 10 min and then closes the connection, when this happens I expect the async iterator to throw an exception (so I can reconnect again) but instead it just hangs forever.
I found this related issue in the grpc-js library which looks the same, but I've been able to workaround it by enabling sending keepalive pings with
'grpc.keepalive_time_ms'
option, can a similar option be added to connect-node library?The text was updated successfully, but these errors were encountered: