How to increase/decrease node.js memory limits using meteor

Apparently, Node has a default memory limit, but it can be adjusted via the --max_old_space_size option. How can I pass this option to Node via Meteor?

In development mode (using the meteor command) you could try setting the NODE_OPTIONS environment variable.

A deployed application is just a node application, so you can set options directly.

Thanks @robfallows, it works for me.

1 Like

how i can set the Node options with meteor will you tell the command how we can do that


export NODE_OPTIONS="--max_old_space_size=4096 --some_other_option"


set NODE_OPTIONS=--max_old_space_size=4096 --some_other_option
1 Like

Guys, on mac to fix this just do this:
export TOOL_NODE_FLAGS="–max_old_space_size=4096"
i think windows you use set instead of export.

Before doing that, my node was stuck at 1.58GB and minification took forever and would randomly abort. Now node will run at 2.5-2.8GB and the minification took very little time and never aborts.