Created
November 13, 2017 17:26
-
-
Save silvae86/bc2aef529b0cc7da827aee05225c9f26 to your computer and use it in GitHub Desktop.
Solving Spawn ENOMEM Error in Ubuntu + NodeJS
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
#credits https://stackoverflow.com/questions/26193654/node-js-catch-enomem-error-thrown-after-spawn | |
sudo fallocate -l 4G /swapfile #Create a 4 gigabyte swapfile | |
sudo chmod 600 /swapfile #Secure the swapfile by restricting access to root | |
sudo mkswap /swapfile #Mark the file as a swap space | |
sudo swapon /swapfile #Enable the swap | |
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab #Persist swapfile over reboots (thanks for the tip, bman!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment