Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
fix(service): fix grpc server size limit
  • Loading branch information
Larryjianfeng committed Jul 15, 2019
1 parent dd09155 commit 09e68da21ca578ca28b62a179edc798343a42205
Showing with 7 additions and 1 deletion.
  1. +4 −0 gnes/cli/
  2. +3 −1 gnes/service/
@@ -161,6 +161,10 @@ def set_grpc_frontend_parser(parser=None):
parser.add_argument('--max_concurrency', type=int, default=10,
help='maximum concurrent client allowed')
parser.add_argument('--max_send_size', type=int, default=100,
help='maximum send size for grpc server in (M)')
parser.add_argument('--max_receive_size', type=int, default=100,
help='maximum receive size for grpc server in (M)')
return parser

@@ -134,7 +134,9 @@ class GRPCFrontend:
def __init__(self, args):
self.logger = set_logger(self.__class__.__name__, args.verbose)
self.server = grpc.server(
options=[('grpc.max_send_message_length', args.max_send_size*1024*1024,
'grpc.max_receive_message_length', args.max_receive_size*1024*1024)])'start a grpc server with %d workers' % args.max_concurrency)
gnes_pb2_grpc.add_GnesRPCServicer_to_server(GNESServicer(args), self.server)

0 comments on commit 09e68da

Please sign in to comment.