java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

io.dapr.exceptions.DaprException: RESOURCE_EXHAUSTED: Received message larger than max (5759620 vs. 4194304)

Open tiankanghello opened this issue 2 years ago • 12 comments

When I came across this problem. What should I do to be normal io.dapr.exceptions.DaprException: RESOURCE_EXHAUSTED: Received message larger than max (5759620 vs. 4194304)

tiankanghello avatar Sep 15 '22 11:09 tiankanghello

@tiankanghello Can you provide more details on this issue -

  1. What apis were you trying and any specific details to reproduce the issue ?
  2. java sdk version?

pravinpushkar avatar Sep 16 '22 05:09 pravinpushkar

my java-sdk version 1.4,my jdk version 1.8.0,k8s dapr version 1.8

tiankanghello avatar Sep 20 '22 08:09 tiankanghello

When I call the grpc api. The data can be called normally within 4M. When the data is greater than 4M, this error will be reported

tiankanghello avatar Sep 20 '22 08:09 tiankanghello

@tiankanghello Can you provide more details on this issue -

  1. What apis were you trying and any specific details to reproduce the issue ?
  2. java sdk version?

my java-sdk version 1.4,my jdk version 1.8.0,k8s dapr version 1.8 When I call the grpc api. The data can be called normally within 4M. When the data is greater than 4M, this error will be reported

tiankanghello avatar Sep 20 '22 08:09 tiankanghello

@tiankanghello please take a look at the CLI flag or equivalent Kubernetes annotation for HTTP request size. https://docs.dapr.io/reference/cli/dapr-run/

"--dapr-http-max-request-size" default is 4, for 4MB For both HTTP and grpc this can be used for the runtime request size set....

mukundansundar avatar Sep 20 '22 08:09 mukundansundar

@tiankanghello please take a look at the CLI flag or equivalent Kubernetes annotation for HTTP request size. https://docs.dapr.io/reference/cli/dapr-run/

"--dapr-http-max-request-size" default is 4, for 4MB For both HTTP and grpc this can be used for the runtime request size set....

--dapr-http-max-request-size I have configured 100M. The api can accept the request. But when the response comes back. The mistake was reported.

tiankanghello avatar Sep 20 '22 08:09 tiankanghello

@tiankanghello Can you provide more details on this issue -

  1. What apis were you trying and any specific details to reproduce the issue ?
  2. java sdk version?

I guess this error is reported by the grpc package. It is possible that the maximum packet size accepted by the grpc packet is 4194304 bytes

tiankanghello avatar Sep 20 '22 09:09 tiankanghello

If this problem can't be solved. I can only compress my data. Then unzip. This is not a good way. Because both the server and client need to be transformed

tiankanghello avatar Sep 20 '22 09:09 tiankanghello

@tiankanghello For grpc, the sdk uses a managed channel and there is a way to set max inbound message size for the channel

https://grpc.github.io/grpc-java/javadoc/io/grpc/ManagedChannelBuilder.html#maxInboundMessageSize-int-

A similar property should be available for okhttp client also

Cc @pravinpushkar

mukundansundar avatar Sep 20 '22 09:09 mukundansundar

@tiankanghello we will take a look at this and get back to you on the next steps....

mukundansundar avatar Sep 20 '22 09:09 mukundansundar

@tiankanghello we will take a look at this and get back to you on the next steps....

I hope you can find the problem as soon as possible, and then give me a reply on how to solve this problem. Thank you.

tiankanghello avatar Sep 20 '22 10:09 tiankanghello

@mukundansundar Will this problem be solved or will it not be adjusted in the near future

tiankanghello avatar Oct 11 '22 07:10 tiankanghello