Q66: How do you increase memory limits for a Node.js process?
Pass the --max-old-space-size=<size_in_mb> V8 flag during startup (e.g., node --max-old-space-size=4096 app.js) to expand the heap limit.
Key Takeaways
- Adjust V8 max heap boundaries via
--max-old-space-size. - Prevents Out-Of-Memory (OOM) crashes during large data processing.
Knowledge Check
Which CLI option sets maximum V8 Old Generation memory capacity to 4GB?