> For the complete documentation index, see [llms.txt](https://dev.viku.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.viku.org/node-v8-memory-leak.md).

# Node v8 memory leak

JavaScript heap out of memory

node v8 内存泄漏

问题： Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

解决：

```bash
#increase to 5gb
export NODE_OPTIONS="--max-old-space-size=5120" 

#increase to 6gb
export NODE_OPTIONS="--max-old-space-size=6144" 

#increase to 7gb
export NODE_OPTIONS="--max-old-space-size=7168" 

#increase to 8gb
export NODE_OPTIONS="--max-old-space-size=8192" 
```
