diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-09-14 09:46:24 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-09-15 08:00:54 +0900 |
commit | 9c61711a5c6a4ddade8473b2fbbda53d48d40cda (patch) | |
tree | 2a138bd5862cc4c7952130dc30c88580fa770c50 /api | |
parent | ea2067ac1cee866b8be8a5082239cc5cbcefdc9c (diff) |
api: increase the max of grpc message size
by default, 4mb, too small, easily hit the limit:
https://github.com/osrg/gobgp/issues/1430
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'api')
-rw-r--r-- | api/grpc_server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go index 54fcffb5..38d5116e 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -43,7 +43,8 @@ type Server struct { } func NewGrpcServer(b *server.BgpServer, hosts string) *Server { - return NewServer(b, grpc.NewServer(), hosts) + size := 256 << 20 + return NewServer(b, grpc.NewServer(grpc.MaxRecvMsgSize(size), grpc.MaxSendMsgSize(size)), hosts) } func NewServer(b *server.BgpServer, g *grpc.Server, hosts string) *Server { |