Skip to content

Instantly share code, notes, and snippets.

@danielres
Last active May 30, 2017 20:02
Show Gist options
  • Save danielres/48665ab455f8512261a12dfca73bfbca to your computer and use it in GitHub Desktop.
Save danielres/48665ab455f8512261a12dfca73bfbca to your computer and use it in GitHub Desktop.
fallocate -l 1G /swapfile && \
chmod 600 /swapfile && \
mkswap /swapfile && \
sudo swapon /swapfile && \
swapon --show
@danielres
Copy link
Author

Small docker instances (like digitalocean's 512mb droplet) fail on tasks that require more RAM than available.
This sets a 1Gb swapfile, and allows those tasks to complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment