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