From 10949f1aba68a489e7e561b8d0ae6fbf6f26d50d Mon Sep 17 00:00:00 2001 From: Petr McAllister Date: Mon, 12 Jan 2026 12:50:50 -0800 Subject: [PATCH] Override JVM heap to 4GB in .bazelrc for ARM64 builds Automation reverts envoy.bazelrc back to 3GB when syncing from upstream. Add override in .bazelrc (which imports after envoy.bazelrc) to permanently set heap to 4GB for ARM64 builds. The 3GB limit causes memory pressure during large downloads which breaks gRPC remote cache connections. --- .bazelrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.bazelrc b/.bazelrc index f77abf6d4ea..28b0301895d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,6 +6,11 @@ # curl -sSL https://raw.githubusercontent.com/envoyproxy/envoy/master/.bazelrc > envoy.bazelrc import %workspace%/envoy.bazelrc +# Istio override: increase JVM heap to 4GB for ARM64 builds (envoy.bazelrc sets 3GB) +# The 3GB limit causes memory pressure during large downloads which breaks gRPC remote cache connections +# See: https://github.com/istio/proxy/pull/6726 +startup --host_jvm_args=-Xmx4g + # Overrides workspace_status_command build --workspace_status_command=bazel/bazel_get_workspace_status build:remote --remote_timeout=7200 @@ -26,6 +31,9 @@ build:remote-ci --action_env=PATH=/usr/local/google-cloud-sdk/bin:/usr/sbin:/usr # relevant for CI build:remote-ci --discard_analysis_cache --nokeep_state_after_build --notrack_incremental_state +# Apply memory optimization flags to all remote cache builds +build:remote --discard_analysis_cache --nokeep_state_after_build --notrack_incremental_state + # Enable path normalization by default. # See: https://github.com/envoyproxy/envoy/pull/6519 build --define path_normalization_by_default=true