Skip to content

Commit 0566936

Browse files
authored
chore: increase message size for gRPC server (#565)
Increase the max message size for the internal gRPC server for SpannerLib. This allows clients to send messages of any size to the shared library when using gRPC.
1 parent e0d9d2f commit 0566936

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spannerlib/grpc-server/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"context"
55
"log"
6+
"math"
67
"net"
78
"os"
89
"os/signal"
@@ -46,6 +47,8 @@ func main() {
4647
log.Fatalf("failed to listen: %v\n", err)
4748
}
4849
var opts []grpc.ServerOption
50+
// Set a max message size that is essentially no limit.
51+
opts = append(opts, grpc.MaxRecvMsgSize(math.MaxInt32))
4952
grpcServer := grpc.NewServer(opts...)
5053

5154
server := spannerLibServer{}

0 commit comments

Comments
 (0)