From 974d8b774a7788ebb014ed5a4a8cef474fec0361 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Fri, 20 Sep 2024 15:23:09 +0200 Subject: [PATCH] Fix maximum inbound message size --- .../java/it/cavallium/rockserver/core/server/GrpcServer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/it/cavallium/rockserver/core/server/GrpcServer.java b/src/main/java/it/cavallium/rockserver/core/server/GrpcServer.java index 44229f0..09af251 100644 --- a/src/main/java/it/cavallium/rockserver/core/server/GrpcServer.java +++ b/src/main/java/it/cavallium/rockserver/core/server/GrpcServer.java @@ -45,6 +45,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicLong; +import org.rocksdb.util.SizeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,6 +78,7 @@ public class GrpcServer extends Server { .directExecutor() .channelType(channelType) .withChildOption(ChannelOption.SO_KEEPALIVE, false) + .maxInboundMessageSize(Math.toIntExact(128 * SizeUnit.MB)) .addService(grpc) .build(); server.start();