Forked from motss/tips_increase_memory_limit_nodejs.md
Created
December 18, 2017 00:31
-
-
Save kaioken/66c31102983bdc9c6201883f088dae33 to your computer and use it in GitHub Desktop.
[TIPS] Increase memory limit in Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// By default the memory limit in Node.js is 512MB. | |
// This will cause FATAL ERROR- JS Allocation failed – process out of memory when processing large data files. | |
// It can be avoided by increasing the memory limit. | |
node --max_old_space_size=1024 server.js // increase to 1gb | |
node --max_old_space_size=2048 server.js // increase to 2gb | |
node --max_old_space_size=3072 server.js // increase to 3gb | |
node --max_old_space_size=4096 server.js // increase to 4gb | |
node --max_old_space_size=5120 server.js // increase to 5gb | |
node --max_old_space_size=6144 server.js // increase to 6gb | |
node --max_old_space_size=7168 server.js // increase to 7gb | |
node --max_old_space_size=8192 server.js // increase to 8gb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment