How can I increase the max memory for Node?

Node has a default max memory usage of less than 2GB on some 64bit systems. This can cause unexpected memory issues when running on CircleCI. It's possible to adjust the max memory ceiling using:

--max-old-space-size=<memory in MB>

 

This can also be done with an environment variable as of Node8

NODE_OPTIONS=--max_old_space_size=4096

 

Further Reading:

https://futurestud.io/tutorials/node-js-increase-the-memory-limit-for-your-process

Was this article helpful?
0 out of 4 found this helpful

Comments

0 comments

Please sign in to leave a comment.