http4s / http4s-grpc

https://http4s.github.io/http4s-grpc/
MIT License
38 stars 3 forks source link

Client `unaryToStream` rpc calls hang indefinitely #122

Open amoreno-netquest opened 3 months ago

amoreno-netquest commented 3 months ago

First, thanks for the great work behind this library! I was giving a try swapping an fs2-grpc-based client with this library, but I encountered one major problem: We are unable to retrieve the response of a unaryToStream rpc call with an http4s-grpc client talking to an grpc-java server. I noticed however that consuming only a finite number of elements of the response (e.g. stream.take(5)) works, but otherwise consistently hangs. I can provide with a contrived example, but it appears to happen irrespective of other details.

Thanks! 🙇‍♂️

hamnis commented 3 months ago

a minimized example would be great. I think this is a bug in http4s-ember as I have seen this with google servers as well.

Try again with http4s-netty, and it should work.

amoreno-netquest commented 3 months ago

It works well with http4s-netty, thanks for the suggestion @hamnis. In light of this problem, maybe it would be good to temporarily advise not using Ember as a default http4s client backend.

hamnis commented 3 months ago

if you are able to create a minimized example we might be able to find and fix the ember bug.

hamnis commented 1 month ago

here is an attempt to create a minimized version:

https://github.com/hamnis/http4s-ember-http2-bug this exposes the ember bug