Reputation: 69
On grpc client I am getting this error after calling the rpc method in server. I am using grpc-spring-boot-starter (java). Please tell me how to increase response size.
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
Upvotes: 1
Views: 8192
Reputation: 69
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 9089).usePlaintext().maxInboundMessageSize(Integer.MAX_VALUE).build();
productsBlockingStub prodStub = productsGrpc.newBlockingStub(channel);
You can refer the grpc project here. Just add modification formaxInboundMessageSize
@GrpcClient("greeting-service")
private GreetingServiceGrpc.GreetingServiceBlockingStub greetingServiceBlockingStub;
greetingServiceBlockingStub = greetingServiceBlockingStub.withMaxInboundMessageSize(Integer.MAX_VALUE);
greetingServiceBlockingStub = greetingServiceBlockingStub.withMaxOutboundMessageSize(Integer.MAX_VALUE);
Or add this in props.
grpc.client.greeting-service.max-inbound-message-size=9155241000
grpc.client.greeting-service.package-max-inbound-message-size=9155241000
grpc.client.greeting-service.server.max-inbound-message-size=9155241000
Upvotes: 4