Skip to content

fix: prevent Gateway stalls caused by container swap - #450

Merged
iililiiilili merged 2 commits into
mainfrom
fix/gateway-memory-limit
Nov 9, 2026
Merged

iililiiilili merged 2 commits into
mainfrom
fix/gateway-memory-limit

Conversation

@iililiiilili

@iililiiilili iililiiilili commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes a deployment issue where the Gateway can become unresponsive while the Node runtime reads heap pages back from swap during garbage collection.

Why This Change Was Made

The deployment bundle sets the Gateway memory and memory-plus-swap limits from one positive value. The 16 GiB default accommodates the existing 8 GiB old-space ceiling, runtime overhead, and reclaimable file cache.

User Impact

Existing deployments pick up the default when Compose recreates the Gateway. Operators can size the limit in deployment.env and use the deployment runbook to confirm that the container has zero swap.

Evidence

  • docker compose config rendered both limits as 16 GiB when unset or empty and as 20 GiB for a 20g override.
  • A disposable Linux cgroup v2 container reported memory.swap.max=0 with the paired 16 GiB limits.
  • The Linux Gateway heap and deployment-upgrade suites passed 37 tests.

CI Recovery

The required npm lock check exposed a pre-existing ACPX failure. npm resolved the Git-hosted package's Commander range to 15.1.0 because its version-qualified selector did not match the commit reference. The npm lock generator now applies the existing child pins by name when the Git-hosted parent has one locked source. Dependency manifests, locked versions, and CI requirements are unchanged.

The ACPX check, all 95 npm package lock validations, and 74 focused Linux regression tests passed locally. The Gateway and npm-lock commits each passed GPT-6.1 Sol autoreview.

@iililiiilili
iililiiilili marked this pull request as ready for review November 9, 2026 06:28
@iililiiilili
iililiiilili merged commit 9c6e821 into main Nov 9, 2026
75 of 76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant