Skip to content

Commit cdfee42

Browse files
buchgrlaurentlb
authored andcommitted
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
1 parent 4e190ba commit cdfee42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/google/devtools/build/lib/remote/RemoteOptions.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ public final class RemoteOptions extends OptionsBase {
3737

3838
@Option(
3939
name = "remote_max_connections",
40-
defaultValue = "0",
40+
defaultValue = "100",
4141
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
4242
effectTags = {OptionEffectTag.HOST_MACHINE_RESOURCE_OPTIMIZATIONS},
4343
help =
4444
"The max. number of concurrent network connections to the remote cache/executor. By "
45-
+ "default Bazel selects the ideal number of connections automatically.")
45+
+ "default Bazel limits the number of TCP connections to 100. Setting this flag to "
46+
+ "0 will make Bazel choose the number of connections automatically.")
4647
public int remoteMaxConnections;
4748

4849
@Option(

0 commit comments

Comments
 (0)