How to increase gRPC message size


I am currently facing this error, while I try to test a grpc service:

{“code”:8,“message”:“grpc: received message larger than max (1179204128 vs. 4194304)”,“details”:}

Is there a way to increase maximum received grpc message size?


Hi @Akshayini !

You should be able to tune that by using connection parametrs Client.connect(address [,params])

Let me know if that answers,

Hi @olegbespalov ,

Thank you for the reply.

I tried to increase the message size by using connect params, but now I get this error:

“code”:13,“message”:“unexpected EOF”,“details”:

Could you please help.


@Akshayini could you please provide more details about the case? :thinking:

Could you give a minimum example of the script you’re using (without any business details)? Do you use GRPC reflection, or what is a proto definition? Does the error repeat each time?


@olegbespalov , I am trying to test a simple unary gRPC service build using C#.

So through my k6 script, I first load the proto files, connect to the gRPC server (where I also give maxReceiveSize param) then invoke the service with empty data and I pass Authorization Bearer token as metadata.

Ideally the service should return me two GUIDs, but here I am getting those GUIDs as null and the error message as: “code”:13,“message”:“unexpected EOF”.

No I am not using GRPC reflection and yes the error is always repeated.

Hope this helps.

Considering these details and the details from the first post, I’d like to ask if the service you are testing is responding well :thinking:

Two GUIDs don’t sound like 1.17 Gb (1179204128 bytes). If you request your service using the grpcurl does it respond appropriately?