On server startup (using command supervisor ./bin/www
) I'm exporting a huge data from mongodb to redis and getting an error:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
However, if I start the command using node --max-old-space-size=4076 ./bin/www
it works fine.
How to configure supervisor
to start node with 4gb memory?