Operations & Support
AutomatedPerformanceMaintenance
3 min read

Scheduled Restarts and Server Maintenance


Regularly restarting your Minecraft server is one of the most effective habits for sustaining consistent 20.0 TPS gameplay, purging unused Java heap memory, and preventing memory leaks.


1. Why Servers Benefit from Regular Restarts

Java applications allocate and recycle heap memory through Garbage Collection (GC). During long server runs:

  • Entity & Chunk Cache Accumulation: Even with chunk unloading enabled, stale tile entities, pathfinding caches, and plugin references can remain cached in RAM.
  • Memory Fragmentation: Extended runtime leads to heap fragmentation, causing Java garbage collection pauses to take longer.
  • Log Rotation: Restarting rotates latest.log cleanly into dated gzip archives inside /logs/.

2. Recommended Restart Frequencies

Server Size Active Player Count Optimal Restart Interval
Small SMP (Survival) 1 to 5 players Once every 24 hours (e.g. 04:00 AM)
Medium SMP / Modded 5 to 15 players Once every 12 hours
Heavy Modpack / Network 15+ players Once every 6 to 8 hours

3. Configuring Auto-Restarts via Plugins

For Spigot, Paper, and Purpur servers, auto-restart plugins provide in-game warning countdowns so players can finish battles or secure their inventories safely.

Using AutoRestart or ServerRestorer:

  1. Install an automated restart plugin via the Dashboard Plugin Installer.
  2. In the plugin's config.yml, set the scheduled time:
    restart-times:
      - "04:00"
      - "16:00"
    warning-times:
      - 600   # 10 minutes warning
      - 300   # 5 minutes warning
      - 60    # 1 minute warning
      - 10    # 10 seconds countdown
    broadcast-message: "&c[Server Notice] Scheduled memory reboot in %time%."
    
  3. When the countdown reaches zero, the server safely saves all player data and chunks with /save-all, then triggers /stop.

4. Backups and Health Verification

Schedule automated backups right before scheduled restarts:

  1. Clean Saves: Running a backup while the server is saving or offline ensures chunk data is 100% consistent.
  2. Crash Loop Safeguard: If a newly updated plugin causes a boot crash, you have an immediate, uncorrupted backup archive created hours earlier.