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?
Thanks.
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.
how i can set the Node options with meteor will you tell the command how we can do that
Linux/OSX:
export NODE_OPTIONS="--max_old_space_size=4096 --some_other_option"
Windows
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.