grpc / grpc-kotlin

Kotlin gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/kotlin
Apache License 2.0
1.2k stars 165 forks source link

Blocking stub blocks indefinitely if client exceeds max outbound message size #628

Open jackrwoods opened 1 month ago

jackrwoods commented 1 month ago

When using a blocking stub to frame a grpc message, I am observing that my GRPC call parks the calling thread indefinitely. I always see a logged exception detailing why the request failed, but the GRPC call does not return.

I have set up a repro in this repository: https://github.com/jackrwoods/grpc-problem-repro. I've reproduced this behavior with a "blocking" stub (https://github.com/jackrwoods/grpc-problem-repro/blob/main/src/main/java/org/example/Main.java) and a coroutine stub wrapped with a runBlocking (https://github.com/jackrwoods/grpc-problem-repro/blob/main/src/main/kotlin/org/example/MainKotlinCoroutineVersion.kt). In both cases, the application never reaches the println("Received message") statement.

Is this user (me) error, or is there a workaround?