From d3228b61f633cdc5b3f740b641a0836f1bd79abd Mon Sep 17 00:00:00 2001 From: buchgr Date: Mon, 2 Jul 2018 09:02:08 -0700 Subject: remote: limit number of open tcp connections by default. Fixes #5491 This change limits the number of open tcp connections by default to 100 for remote caching. We have had error reports where some use cases Bazel would open so many TCP connections that it crashed/ran out of sockets. The max. number of TCP connections can still be adjusted by specifying --remote_max_connections. See also #5047. RELNOTES: In remote caching we limit the number of open TCP connections to 100 by default. The number can be adjusted by specifying the --remote_max_connections flag. PiperOrigin-RevId: 202958838 --- .../java/com/google/devtools/build/lib/remote/RemoteOptions.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java index f3fa147291..bb61082a3d 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java @@ -37,12 +37,13 @@ public final class RemoteOptions extends OptionsBase { @Option( name = "remote_max_connections", - defaultValue = "0", + defaultValue = "100", documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS}, help = "The max. number of concurrent network connections to the remote cache/executor. By " - + "default Bazel selects the ideal number of connections automatically.") + + "default Bazel limits the number of TCP connections to 100. Setting this flag to " + + "0 will make Bazel choose the number of connections automatically.") public int remoteMaxConnections; @Option( -- cgit v1.2.3