Error Diagnostics // NodeFlow Diagnostics
Docker Exit 137 OOM Kill During Vector Ingestion
When combined container RSS exceeds your VPS physical RAM, the Linux kernel OOM killer sends SIGKILL (Exit Code 137) to the largest container—usually Flowise or Qdrant.
Measured Stack Telemetry & Memory Profile
Many teams size Node.js NODE_OPTIONS to 80% of VPS RAM, forgetting that Qdrant HNSW indexes, pgvector shared buffers, Redis AOF, and Linux page cache all share the same host RAM pool. During bulk vector ingestion, RSS spikes past 100% and kills the worker mid-upsert.
| Subsystem / Signal | Measured Target | Operational Impact |
|---|---|---|
| KVM 2 (8 GB) Safe Sum | <= 6.6 GB container limits | Leaves 1.4 GB for Linux + Docker daemon |
| KVM 4 (16 GB) Safe Sum | <= 13.8 GB container limits | Supports 8192 MB Node + Qdrant + Postgres |
| KVM 8 (32 GB) Safe Sum | <= 28.5 GB container limits | Zero Exit 137 under 20k-page ingestion |
Step-by-Step Triage & Config Remediation
- Check kernel OOM logs: Run dmesg -T | grep -i -E "oom|killed" to confirm which container triggered SIGKILL.
- Apply explicit mem_limit per service: Add mem_limit caps in docker-compose.yml so one runaway PDF chunker cannot kill Postgres.
- Right-size to KVM 4 or KVM 8: Upgrade 8 GB nodes to Hostinger KVM 4 (16 GB, $9.99/mo) whenever co-locating Qdrant + Redis workers.
docker inspect flowise-main --format='{{.State.OOMKilled}} {{.State.ExitCode}}'
dmesg -T | grep -i "killed process"
Diagnostic FAQ
Does adding Linux swap prevent Exit 137?
A 2-4 GB NVMe swapfile absorbs short spikes, but heavy embedding swaps slow ingestion 10x and still trigger 504 timeouts.
Which container should get the largest mem_limit?
Give Flowise/Langflow workers ~50-55% of host RAM, Qdrant/pgvector ~20-25%, and reserve the rest for OS/Redis.