# Node.js ## Memory limits Node.js apps frequently OOM-crash at the default 512Mi limit. Set a higher limit and cap the V8 heap so it stays under it: ```yaml resources: limits: memory: 1Gi requests: memory: 512Mi env: - name: NODE_OPTIONS value: "--max-old-space-size=768" ``` `--max-old-space-size` is in MiB. Keep it 25–33% below the container limit so the process has headroom for non-heap memory (buffers, native modules, etc.). **Applies to**: NocoDB, Outline, Gitea (web), and any Electron/Express/Next.js app.