mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
Before the multi-minute unpack starts, compare the archive's declared uncompressed export.xml size against the V8 heap limit. The streaming parse keeps resident state span-bounded, so the model is generous — a fixed 192 MiB base plus 1/64 of the XML size; the 8 GiB extraction cap needs ~320 MiB, which any default heap clears. The check only refuses the truly impossible (an operator-pinned tiny heap against a huge export) and does so with an actionable failureReason naming NODE_OPTIONS=--max-old-space-size, instead of an OOM-killed worker and a job stuck in a running state (#775). Document the memory model, the insufficient_memory refusal, and the interrupted-import reconcile in the self-hosting scaling guide.