From ec08d77474f9433728a320b28dfb647a80fd3738 Mon Sep 17 00:00:00 2001 From: Parveen Kumar Date: Thu, 29 Oct 2020 11:05:08 -0700 Subject: [PATCH] Specify a large value for max metadata size in grpc_cli client channel. This is useful in cases where server sends back large stacktrace and default value of 8192 isn't enough. --- test/cpp/util/grpc_tool.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc index eed3ddb3dcb..6e1fd9da909 100644 --- a/test/cpp/util/grpc_tool.cc +++ b/test/cpp/util/grpc_tool.cc @@ -235,6 +235,9 @@ std::shared_ptr CreateCliChannel( args.SetString(GRPC_ARG_SERVICE_CONFIG, FLAGS_default_service_config.c_str()); } + // See |GRPC_ARG_MAX_METADATA_SIZE| in |grpc_types.h|. + // Set to large enough size (10M) that should work for most use cases. + args.SetInt(GRPC_ARG_MAX_METADATA_SIZE, 10 * 1024 * 1024); return ::grpc::CreateCustomChannel(server_address, cred.GetCredentials(), args); }