diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 0bbfa8676ec02d..06e835e71f1d0b 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -1627,6 +1627,9 @@ bool BlazeServer::Connect() { // locally over gRPC; so we want to ignore any configured proxies when setting // up a gRPC channel to the server. channel_args.SetInt(GRPC_ARG_ENABLE_HTTP_PROXY, 0); + // The Bazel server may send responses larger than the default (4 MiB), e.g. + // when an invocation has a very large failure detail. + channel_args.SetMaxReceiveMessageSize(20 * 1024 * 1024); std::shared_ptr channel(grpc::CreateCustomChannel( port, grpc::InsecureChannelCredentials(), channel_args)); std::unique_ptr client(CommandServer::NewStub(channel));