Skip to content

Instantly share code, notes, and snippets.

@shiehnpin
Created March 23, 2020 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiehnpin/e8e9940ae7c74e5a52908434446d1e15 to your computer and use it in GitHub Desktop.
Save shiehnpin/e8e9940ae7c74e5a52908434446d1e15 to your computer and use it in GitHub Desktop.
can't alloc memory 12
https://serverfault.com/questions/671878/suddenly-error-cannot-allocate-memory-errno-12
"Memory: 4k page, physical 1027040k(224852k free), swap 0k(0k free)"
create swap file
http://man.linuxde.net/mkswap
1024*4*1024 = 4194304 (4Gb)
sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=4194304
sudo mkswap /swapfile1
sudo chmod 600 /swapfile1
sudo swapon /swapfile1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment