How do I fix client errors saying "Received message larger than max"?
I have a client query that gives an error Received message larger than max
. How can I fix this?
gRPC has a default maximum message size of 4MB, but Deephaven clients have a default maximum size of 100MB. Attempting to send messages larger than 100MB will result in an error. To fix this, you should either:
- Reduce message sizes by breaking them into smaller chunks.
- Increase the maximum message size on both the client and server.
For the latter, refer to Grpc_arg_keys
for available options. The relevant keys are:
GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
GRPC_ARG_MAX_SEND_MESSAGE_LENGTH
For the Groovy client, you can set these options when constructing the session via the maxInboundMessageSize
method:
import io.deephaven.client.ClientConfig
import io.deephaven.uri.DeephavenTarget
def target = DeephavenTarget.of(URI.create("dh://localhost:10000"))
def clientConfig = ClientConfig.builder()
.target(target)
.maxInboundMessageSize(200 * 1024 * 1024) // Increases limit from 100MB to 200MB
.build()
:::note
These FAQ pages contain answers to questions about Deephaven Community Core that our users have asked in our Community Slack. If you have a question that is not in our documentation, join our Community and we'll be happy to help!
:::