Skip to content

Instantly share code, notes, and snippets.

@joglomedia
Created February 16, 2019 12:22
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 joglomedia/710ef8a5f9fbcf11b628baa54c831db4 to your computer and use it in GitHub Desktop.
Save joglomedia/710ef8a5f9fbcf11b628baa54c831db4 to your computer and use it in GitHub Desktop.
FIX bash error “Cannot allocate memory” on Ubuntu Server
To get out of this condition without rebooting, you can trigger the OOM killer manually as follows:
echo 1 > /proc/sys/kernel/sysrq
echo f > /proc/sysrq-trigger
echo 0 > /proc/sys/kernel/sysrq
Ref : https://askubuntu.com/questions/845233/running-any-command-returns-cannot-allocate-memory-on-ubuntu-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment