From 19529f38b8b3d656c76e17435bae37e57bdfd6cf Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Thu, 27 Aug 2026 09:07:51 +0800 Subject: [PATCH] fix: lower default gateway heap for e2-micro Co-Authored-By: Codex --- docker-compose.yml | 6 +++++- tests/test_docker_compose_ports.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index af82837..d9f073a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,11 @@ services: # e2-micro has less than 1 GiB RAM. The upstream image defaults to # -Xmx768m, which can starve sshd/Docker/guest-agent. Keep this # configurable, but use a safer default for the current VM. - - JAVA_HEAP_SIZE=${JAVA_HEAP_SIZE:-512} + # 384 MiB was stable in the recovery smoke check: it leaves + # room for the guest OS and prevents the Gateway UI from being killed + # before the login dialog can report a broker-side failure. Operators can + # still set JAVA_HEAP_SIZE explicitly for a larger VM. + - JAVA_HEAP_SIZE=${JAVA_HEAP_SIZE:-384} # The upstream vmoptions use 20 parallel GC threads, which is too # aggressive for the current 2 vCPU VM and can slow Gateway startup. - IB_GATEWAY_PARALLEL_GC_THREADS=${IB_GATEWAY_PARALLEL_GC_THREADS:-2} diff --git a/tests/test_docker_compose_ports.sh b/tests/test_docker_compose_ports.sh index e530737..6720389 100644 --- a/tests/test_docker_compose_ports.sh +++ b/tests/test_docker_compose_ports.sh @@ -53,7 +53,7 @@ grep -Fq ' - IBC_SECOND_FACTOR_AUTHENTICATION_EXIT_INTERVAL=${IBC_SECOND_FA grep -Fq ' - EXISTING_SESSION_DETECTED_ACTION=${EXISTING_SESSION_DETECTED_ACTION:-primary}' "$compose_file" grep -Fq ' - IBKR_2FA_AUTOFILL=${IBKR_2FA_AUTOFILL:-yes}' "$compose_file" grep -Fq ' - IBKR_2FA_MAX_SUBMISSIONS=${IBKR_2FA_MAX_SUBMISSIONS:-1}' "$compose_file" -grep -Fq ' - JAVA_HEAP_SIZE=${JAVA_HEAP_SIZE:-512}' "$compose_file" +grep -Fq ' - JAVA_HEAP_SIZE=${JAVA_HEAP_SIZE:-384}' "$compose_file" grep -Fq ' - IB_GATEWAY_PARALLEL_GC_THREADS=${IB_GATEWAY_PARALLEL_GC_THREADS:-2}' "$compose_file" grep -Fq ' - IB_GATEWAY_CONC_GC_THREADS=${IB_GATEWAY_CONC_GC_THREADS:-1}' "$compose_file" grep -Fq ' - ACCEPT_API_FROM_IP=${ACCEPT_API_FROM_IP:?Set ACCEPT_API_FROM_IP to your Cloud Run egress subnet or connector CIDR}' "$compose_file"