Skip to content

Commit

Permalink
Try disabling grpc server auto flow control
Browse files Browse the repository at this point in the history
Was turned on by default during 1.26.0->1.31.1 grpc-java bump
It seems that it may be causing errors in RBE:

io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: Bandwidth exhausted
HTTP/2 error code: ENHANCE_YOUR_CALM
Received Goaway
too_many_pings

bazelbuild#12264
grpc/grpc-java#7302

Closes bazelbuild#12266.

PiperOrigin-RevId: 337254515
  • Loading branch information
dmivankov authored and copybara-github committed Oct 15, 2020
1 parent 0218270 commit 6e94b05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,22 @@ public void serve() throws AbruptExitException {
throw new IOException("ipv6 is not preferred on the system.");
}
server =
NettyServerBuilder.forAddress(address).addService(this).directExecutor().build().start();
NettyServerBuilder.forAddress(address)
.addService(this)
.directExecutor()
// disable auto flow control https://github.com/bazelbuild/bazel/issues/12264
.flowControlWindow(NettyServerBuilder.DEFAULT_FLOW_CONTROL_WINDOW)
.build()
.start();
} catch (IOException ipv6Exception) {
address = new InetSocketAddress("127.0.0.1", port);
try {
server =
NettyServerBuilder.forAddress(address)
.addService(this)
.directExecutor()
// disable auto flow control https://github.com/bazelbuild/bazel/issues/12264
.flowControlWindow(NettyServerBuilder.DEFAULT_FLOW_CONTROL_WINDOW)
.build()
.start();
} catch (IOException ipv4Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ public Server startServer() throws IOException {
logger.atInfo().log("Execution disabled, only serving cache requests");
}

// disable auto flow control https://github.com/bazelbuild/bazel/issues/12264
b.flowControlWindow(NettyServerBuilder.DEFAULT_FLOW_CONTROL_WINDOW);

Server server = b.build();
logger.atInfo().log("Starting gRPC server on port %d", workerOptions.listenPort);
server.start();
Expand Down

0 comments on commit 6e94b05

Please sign in to comment.