Ubuntu – memory&swap are full, can’t ssh; any option other than physical restart

outofmemoryerrorserver-crashessshUbuntu

by mistake, i executed some applications that used all memory (and i think swap) on my ubuntu server and its now crashed, SSH doesn't work and freezes. Do you know any other options other than following solutions:

  1. physically restart the server.
  2. wait until a process ends.

is there any way to remotely restart the server when ssh not working? i can still ping the server, so wondering if any reserved memory is there for killing unfriendly processes or for basic commands such as restarting the Os.

*The commands executed with "nohup" so they didn't end by closing ssh sessions.

Best Answer

No, your system is... pretty much done. Your only hopes are waiting for one to end, or having one get so large that the OOM killer sweeps in and does something about it.