Fixes

Game Server RAM Keeps Climbing: Memory Leak or Normal? How to Fix It

How to tell a real memory leak from normal RAM growth on a game server, find the mod or bug behind it, and set up scheduled restarts that keep it stable.

Updated Oct 7, 2026 · 6 min read

On this page

If your game server's RAM use rises steadily over hours or days, keeps rising when the player count is flat, and ends with the server crashing or being killed for running out of memory, that is a memory leak. If it rises and then levels off, it is normal: servers load areas, cache assets and grow their heap as players explore. Leaks are usually caused by a mod or plugin, sometimes by a bug in the game itself. Measure memory over time to confirm, update the game, test without mods to find the culprit, and use scheduled restarts to keep the server healthy while you wait for a fix.

Normal growth vs a leak

Plenty of RAM growth is expected:

  • Loading the world. As players spread out, the server loads more chunks, cells or tiles. Memory rises, then plateaus once the active area stops growing.
  • Java heap behavior. Minecraft runs on Java, which grows its heap up to the -Xmx limit and rarely gives memory back to the operating system. A Minecraft server sitting near its limit is normal.
  • Caching. Many engines keep assets in memory after first use, so a fresh server uses less than one that has been running for an hour.
  • More stuff in the world. Bases, tamed creatures, dropped items and vehicles all take memory. That is growth of the world, not a leak. It stops when the world stops growing.

A leak looks different. Memory keeps going up at a fairly steady rate, regardless of player count, never plateaus, and drops back only when you restart.

Step 1: measure over time

One reading tells you nothing. Log memory every few minutes for a day.

On Linux, find the server's process ID and log its resident memory:

PID=$(pgrep -f RustDedicated)
while true; do echo "$(date '+%F %T') $(ps -o rss= -p $PID)" >> mem.log; sleep 300; done

That writes the memory in KB every five minutes. On Windows, use Performance Monitor (perfmon), add the counter Process, Working Set for the server process, and let it record. Our guide on how to check game server RAM usage covers the tools in more detail.

Write down the player count at a few points too. If memory climbs at night with nobody online, that is a strong sign of a leak.

Step 2: confirm it ends badly

A leak matters when it crashes the server. On Linux, the kernel's out of memory killer leaves a message:

dmesg -T | grep -i -E "out of memory|killed process"
journalctl -k | grep -i oom

Out of memory: Killed process 12345 (RustDedicated) means the system ran out and killed your server. In Docker you may see exit code 137. On Windows, look in Event Viewer under Windows Logs, System for "Resource-Exhaustion-Detector" warnings, or in the game's crash log for allocation failures.

Step 3: rule out the game itself

Check the game's patch notes, Steam forum and bug tracker for known leaks in the current build. Leaks are common right after big updates, and developers often fix them within a patch or two. Update the server and see if the climb slows down. Palworld, for example, has had memory problems serious enough to need their own guide: see Palworld server lag and memory fix.

Step 4: find the mod or plugin

On modded servers, a leaky mod is the most likely cause. Find it by splitting:

  1. Back up the server.
  2. Disable half the mods and run for the same length of time it usually takes to see the climb.
  3. If the leak is gone, it is in the disabled half. If not, it is in the enabled half.
  4. Keep halving until one mod is left.

Tools that speed this up:

  • Minecraft: spark's /spark heapsummary shows which classes take the most memory, which often names the mod.
  • Rust with Oxide or Carbon: plugins that store data per player and never clean it up are a common cause. Watch which plugins have growing data files in oxide/data.
  • Unreal Engine games (ARK, Conan Exiles): mods that spawn structures or creatures without cleanup can look like a leak. Check counts in game as well as RAM.

Step 5: schedule restarts

Until the leak is fixed, restarting before memory runs out keeps the server playable. Pick a time when few people are online and warn players first.

On Linux with systemd, a cron job does it:

# crontab -e as root: restart every day at 05:00
0 5 * * * systemctl restart rust

Better, send a warning through RCON a few minutes before. Rust, for example, has a built in restart console command that counts down for players: restart 300 "Daily restart". Many games and frameworks have similar commands.

How often depends on how fast the leak grows. If the server dies after 30 hours, restart every 24. If it dies after 8, restart every 6 and push for a real fix. Our guide on how often to restart a game server gives typical schedules per game.

Step 6: give yourself headroom

While you find the cause, make the failure less painful:

  • Leave free RAM. If the machine also runs a desktop, a browser or a second server, the leak hits the limit sooner.
  • Add swap on Linux. A swap file turns a sudden kill into a slow down, which gives your restart time to happen. It is a safety net, not a fix.
  • Save often. A shorter autosave interval means less lost progress if the server is killed. See game server autosave interval settings.
  • Back up before testing. A server killed mid save can damage a world. If that happens, see how to recover a corrupted game server world.

A Palworld base with Pals at work, a game whose servers have needed regular restarts for memory

Hosted servers and memory limits

Hosted servers have a fixed memory limit per plan. When a leak hits it, the server is stopped instead of slowing the whole machine. On a GamezServers server you can watch the live console, take one click backups before testing mods, and change plans at any time with the price prorated if your modded world simply needs more room. Palworld servers there also have a scheduled restart setting in the panel. Plans are priced by RAM, about 2.50 USD per GB a month, so you only pay for what the world really needs.

FAQ

How do I know if my game server has a memory leak?

Log RAM use every few minutes for a day. If it keeps climbing at a steady rate even when the player count is flat, and only drops on restart, it is a leak.

Does a memory leak damage my world?

The leak itself does not, but a server killed for running out of memory can be cut off in the middle of a save. Keep backups and restart before it gets that far.

Will more RAM fix a memory leak?

No. More RAM only delays the crash. It can buy time between restarts while you find the mod or wait for a game patch.

Why does my Minecraft server always use all its RAM?

Java grows its heap up to the -Xmx value and keeps it. That is normal and not a leak, unless the server also crashes with out of memory errors.

Want a server without the setup?

From75¢

Pick a game, pay, play. Live the moment checkout finishes.

Keep reading