fix(docker-dev): mem_limit 1g->2g (1g OOM-killed central nodes under materialise load)

This commit is contained in:
Joseph Doherty
2026-06-07 14:40:43 -04:00
parent f078d41a8b
commit 89c07fc382
+10 -8
View File
@@ -123,14 +123,16 @@ services:
image: otopcua-host:dev
# Per-node memory bounds. The full single-mesh stack (6 host nodes) OOM-killed
# central-1 on a loaded host. Each host node measured ~357 MiB idle-solo and
# climbs under the full mesh + deploy/UI load, so cap at 1g (≈peak + headroom)
# with a 512m reservation. These top-level keys are inherited by every service
# that uses `<<: *otopcua-host` (YAML merge keeps the anchor's scalar keys; only
# the `environment` block is re-declared per service). Compose v2 honors
# `mem_limit`/`mem_reservation`. The full mesh needs ~6g of Docker Desktop VM
# memory — on a constrained host raise the VM memory or run fewer host services.
mem_limit: 1g
mem_reservation: 512m
# climbs sharply under deploy/materialise load: a node materialising its full
# cluster slice (e.g. central → MAIN's galaxy mirror + UNS overlay, ~1400 OPC UA
# nodes) peaks well above 1g during a deploy — a 1g cap OOM-kills it (exit 137).
# Cap at 2g (≈peak + headroom) with a 1g reservation. These top-level keys are
# inherited by every service that uses `<<: *otopcua-host` (YAML merge keeps the
# anchor's scalar keys; only the `environment` block is re-declared per service).
# The full 6-node mesh needs ~12g of Docker Desktop VM memory — on a constrained
# host raise the VM memory or run fewer host services.
mem_limit: 2g
mem_reservation: 1g
depends_on:
sql: { condition: service_healthy }
migrator: { condition: service_completed_successfully }