Possible bug in gRPC client regarding MaxInboundMessageSize

580 views
Skip to first unread message

David Hoffer

unread,
Nov 23, 2021, 11:05:40 AM11/23/21
to Quarkus Development mailing list
I have found I get the following error in the gRPC client when the server sends a large message.

I have a very large value set for quarkus.grpc.clients.std.max-inbound-message-size property.

However if I in code set withMaxInboundMessageSize on the Grpc stub to a large value everything works as expected.  It seems the property value is being ignored.

                                                  Powered by Quarkus 2.4.2.Final
2021-11-23 08:43:20,610 INFO  [io.quarkus] (main) app-grpc-client 1.0-SNAPSHOT on JVM (powered by Quarkus 2.4.2.Final) started in 0.914s.
2021-11-23 08:43:20,611 INFO  [io.quarkus] (main) Profile prod activated.
2021-11-23 08:43:20,612 INFO  [io.quarkus] (main) Installed features: [cdi, config-yaml, smallrye-context-propagation, vertx]
2021-11-23 08:43:20,615 INFO  [com.bs.grp.cli.GrpcMain] (main) Running main method
2021-11-23 08:43:29,004 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream
io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: gRPC message exceeds maximum size 4194304: 139524662021-11-23 08:43:29,005 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream

        at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
        at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
2021-11-23 08:43:29,007 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream
        at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
        at com.bs.app.proto.services.test.TestServiceGrpc$TestServiceBlockingStub.current(TestServiceGrpc.java:993)
        at com.bs.grpc.client.ProtobufClient.run(ProtobufClient.java:126)
2021-11-23 08:43:29,008 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream
        at com.bs.grpc.client.GrpcMain.run(GrpcMain.java:79)
        at com.bs.grpc.client.GrpcMain_ClientProxy.run(GrpcMain_ClientProxy.zig:129)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:125)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
        at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:30)
2021-11-23 08:43:29,009 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream
2021-11-23 08:43:29,009 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream
2021-11-23 08:43:29,009 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream
2021-11-23 08:43:29,009 INFO  [io.grp.int.AbstractClientStream] (grpc-nio-worker-ELG-2-2) Received data on closed stream

clement escoffier

unread,
Nov 23, 2021, 11:58:55 AM11/23/21
to dhof...@gmail.com, Quarkus Development mailing list
Hello,

Sounds like a bug.
Can you open an issue with a reproducer?

We may simply not call the `withMaxInboundMessageSize` method.

Clement



--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/55139218-cf15-4615-93e1-6223299599e6n%40googlegroups.com.

David Hoffer

unread,
Nov 23, 2021, 12:11:44 PM11/23/21
to clement escoffier, Quarkus Development mailing list

clement escoffier

unread,
Nov 23, 2021, 12:28:05 PM11/23/21
to David Hoffer, Quarkus Development mailing list
Thanks! 

David Hoffer

unread,
Nov 24, 2021, 11:09:19 AM11/24/21
to Quarkus Development mailing list
I just requested the bug report be deleted.  It was an error on my part.  It turns out in my case I didn't have the client configured correctly for Quarkus to read the properties.  Since the online Quarkus docs for gRPC were too brief I had to use other sources as well and they didn't do it the Quarkus way so that part did not work.  I would like to see the docs expanded to show how to use CallCredentials and multiple client application configs/etc.

However all appears to work correctly once configured correctly.

-Dave

clement escoffier

unread,
Nov 24, 2021, 11:19:18 AM11/24/21
to Quarkus Development mailing list
Hello,

On 24 Nov 2021 at 17:09:19, David Hoffer <dhof...@gmail.com> wrote:
I just requested the bug report be deleted.  It was an error on my part.  It turns out in my case I didn't have the client configured correctly for Quarkus to read the properties.  Since the online Quarkus docs for gRPC were too brief I had to use other sources as well and they didn't do it the Quarkus way so that part did not work.  I would like to see the docs expanded to show how to use CallCredentials and multiple client application configs/etc.

However all appears to work correctly once configured correctly.

That’s somewhat great to hear!
And yes, we definitely want to improve / extend the documentation.
Can you open an issue with the topic you would like to get covered. Michal or I can have a look quickly.

Clement

David Hoffer

unread,
Dec 1, 2021, 9:36:51 AM12/1/21
to Quarkus Development mailing list
Sorry for the delay, I just created https://github.com/quarkusio/quarkus/issues/21850 for the documentation suggestions.

-Dave

Reply all
Reply to author
Forward
0 new messages