Linux & VPS

Fix Linux Killing Your Server (OOM Killer / Out of Memory)

Out of memory: Killed processoom-killerserver randomly stops
6 min read Updated 12 June 2026 ESAGAMES Team

If your server process vanishes with no crash log, Linux probably killed it to save the system from running out of RAM — the "OOM killer". Here's how to confirm and prevent it.

Confirm it was the OOM killer

Check the kernel log for the tell-tale message:

dmesg | grep -i 'killed process'
journalctl -k | grep -i oom

A line like Out of memory: Killed process 1234 (java) confirms the kernel killed your server to free RAM.

Why it happens

The total RAM requested by everything on the box exceeded what's available. Common causes: a server allocated more than the machine has (e.g. -Xmx too high), too many servers on one box, or a memory leak.

How to stop it

  • Lower your allocation — leave 1–2 GB for the OS; never give a server all system RAM.
  • Add swap — a few GB of swap absorbs spikes (slower, but prevents kills).
  • Run fewer services per box, or move to a plan with more RAM.
  • Find leaks — if usage only ever climbs, profile the app/plugins.
# add 4G of swap
fallocate -l 4G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
It kills the "worst" process

The OOM killer targets the process using the most memory — often your game server, even if a different process caused the spike. Fixing total RAM pressure is the real solution.

Confirm with dmesg, then leave headroom for the OS, add swap, and run within the RAM you actually have.

Right-sized RAM, no surprises

Our plans give your server the RAM it needs with room to spare — no OOM kills, protected in Frankfurt.

See hosting
FAQ

Frequently asked questions

Why does my game server randomly stop with no crash?

Linux's OOM killer probably terminated it to free RAM. Check dmesg for "Killed process". It means the machine ran out of memory and the kernel killed the biggest process — often your server.

How do I stop the OOM killer killing my server?

Don't over-allocate RAM (leave 1–2 GB for the OS), add some swap to absorb spikes, run fewer services per machine, or move to a plan with more memory. Fix any memory leaks.

Does adding swap fix out-of-memory?

Swap absorbs short spikes and prevents kills, but it's much slower than RAM. It's a safety net, not a substitute for having enough actual memory for your workload.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney