How to Fix Memory Leaks on Your Palworld Server
Stop your Palworld dedicated server from running out of RAM. Disable invaders, schedule restarts, and tune autosave to keep your server stable.
Palworld dedicated servers have a well-known memory leak — RAM usage grows over time until the server starts rubber-banding, freezing, or OOM-crashing. The good news: there are three concrete fixes that, combined, completely tame it. None of them require mods.
TL;DR — The Three Fixes
| Fix | Effort | Impact |
|---|---|---|
Disable raid invaders (bEnableInvaderEnemy=False) | 30 seconds | Cuts RAM use by ~50% |
| Schedule periodic restarts (every 2–4h) | 5 minutes | Caps memory growth |
Tune AutoSaveSpan | 30 seconds | Smaller save spikes |
Fix #1: Disable Raid Invaders
This is the single biggest win. Pal raids spawn waves of high-poly enemies that the server holds in memory and never cleans up properly. Disabling them is the closest thing Palworld has to an official memory-leak workaround.
Stop your server from Console in the XGamingServer Panel.
Open Pal/Saved/Config/LinuxServer/PalWorldSettings.ini in Files. Inside the OptionSettings=(...) line, find or add:
bEnableInvaderEnemy=FalseSave and start the server. Memory usage on a fresh start should drop by roughly half compared to the same world with invaders enabled.
Players still get base raids from wild Pals — only the scripted invader waves are disabled.
Fix #2: Schedule Periodic Restarts
Palworld's memory leak is gradual. Even with invaders off, RAM creeps upward. Restarting the server resets the leak completely — and on XGamingServer you can schedule this without ever logging in.
| Server Size | Memory | Restart Frequency |
|---|---|---|
| Small (1–4 players) | 4 GB | Every 4–6 hours |
| Medium (5–16 players) | 8 GB | Every 2–4 hours |
| Large (17–32 players) | 12+ GB | Every 1–2 hours |
| With invaders enabled | any | Every hour |
Set Up a Scheduled Restart
In the XGamingServer Panel, open the Schedules tab.
Click New Schedule. Name it "Auto restart" and set the cron expression — 0 */4 * * * runs every 4 hours.
Add a task: Power Action → Restart. Save.
The server will now restart on its own. Players get auto-saved before shutdown so progress is preserved.
Fix #3: Tune Auto-Save Frequency
Palworld saves the world every AutoSaveSpan seconds. The default is 15.000000 — three save spikes a minute. On a memory-pressured server, those spikes hurt; spreading them out helps.
In PalWorldSettings.ini:
AutoSaveSpan=30.000000| Value | Behavior |
|---|---|
15.000000 | Default — saves every 15 seconds |
30.000000 | Save every 30 seconds (good middle ground) |
60.000000 | Save every minute (less I/O, slightly more lost on crash) |
Don't set this above 60 — you'll lose meaningful progress if the server crashes between saves.
What NOT To Do
| Don't | Why |
|---|---|
| Don't add more RAM | The leak grows to fill whatever RAM is available. More RAM = longer wait until the same crash. |
| Don't disable backups | The backup save isn't the leak. Disabling it just means you lose data when the leak crashes you. |
Don't lower ServerReplicatePawnCullDistance below 5000 | Pals stop syncing properly. Players see frozen Pals. |
| Don't run multiple servers in the same container | Their memory use compounds and you get OOM-killed faster. |
Verifying the Fix
After applying all three, watch the memory usage in the panel sidebar over 2–3 hours:
- Before fix: RAM climbs steadily, hits the cap, server freezes or OOMs
- After fix: RAM stabilizes at a sustainable level, scheduled restart resets it before any climb becomes a problem
If you're still seeing climbs, double-check bEnableInvaderEnemy=False actually saved into OptionSettings=() (the panel sometimes reverts edits if you don't stop the server first).
Related Guides
How is this guide?
