bloomrpc icon indicating copy to clipboard operation
bloomrpc copied to clipboard

Do we have a way to set grpc client max size

Open a7744hsc opened this issue 6 years ago • 14 comments

When calling a method with a response bigger than 4M, I got the following error:

{
  "error": "8 RESOURCE_EXHAUSTED: Received message larger than max (5679988 vs. 4194304)"
}

Do we have a way to set the max response size of grpc client?

a7744hsc avatar Sep 20 '19 11:09 a7744hsc

At the moment there is no way to set the max response size but probably we can just disable the response size all together what do u think?

fenos avatar Sep 20 '19 14:09 fenos

Disable the response size limitation will solve my problem. But I wonder why GRPC has this option and if it is needed in some specific use case (I am not a grpc expert).

a7744hsc avatar Sep 25 '19 07:09 a7744hsc

I am getting this error too, was this fixed in a newer release?

simon-fisher avatar Apr 09 '20 21:04 simon-fisher

I am getting this error too, was this fixed in a newer release?

yusubond avatar Sep 03 '20 03:09 yusubond

+1

SpencerSharkey avatar Sep 05 '20 18:09 SpencerSharkey

This is a restriction on grpc server side, not client side

jackielii avatar Nov 11 '20 15:11 jackielii

Hi @jackielii , the max message size is a client side setting. See for example for Java client: https://grpc.github.io/grpc-java/javadoc/io/grpc/ManagedChannelBuilder.html#maxInboundMessageSize-int- and this for C++ client: https://grpc.github.io/grpc/cpp/classgrpc_1_1_channel_arguments.html#a2629f85664dd2822fe54059c4730baf8

Can you please reopen this issue ?

omerv85 avatar Nov 24 '20 07:11 omerv85

Hi guys, any update for this issue?

Ojdana11 avatar Jan 11 '21 14:01 Ojdana11

+1, removing it altogether will certainly work as a workaround.

Wintereise avatar Jan 18 '21 03:01 Wintereise

+1

davidyudd avatar Jan 22 '21 17:01 davidyudd

+1

Mikuz avatar Feb 08 '21 15:02 Mikuz

It would be useful to be able to set any of the gRPC channel arguments via a configuration that overrides the defaults.

AlbertWigmore avatar Mar 23 '21 16:03 AlbertWigmore

Hi, having the same problem. When using bloomRPC I get:

{
  "error": "8 RESOURCE_EXHAUSTED: Received message larger than max (5477912 vs. 4194304)"
}

My own python client that set grpc.max_receive_message_length work as expected.

mbn18 avatar Apr 16 '21 06:04 mbn18

Having same problem with max receive size limitation. seems Bloom RPC just using default max receive size. I am using gRPC ecosystem Golang. if you guys using this then want a workaround, you can configure in gRPC gateway configuration and using REST platform instead to call the API (e.g: Postman, cURL, etc).


import "google.golang.org/grpc"
...
var opts []grpc.DialOption

maxReceiveMessageSize := 1024 * 1024 * n // change this with your desired size in MB
opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxReceiveMessageSize)))

dial, err := grpc.Dial(svrOpt.Addr, opts...)
if err != nil {
	panic(err)
}
...

asepnur avatar Oct 08 '21 07:10 asepnur