Symptoms: java.lang.OutOfMemoryError, Server ran out of memory, GC overhead limit exceeded
Possible Causes
- Not enough RAM allocated to the server
- The Xmx value is too low
- A plugin with a memory leak
- Too many loaded worlds
Step-by-Step Fix
Step 1
Raise the -Xmx value in your start script. Allocate around 70% of your VPS RAM capacity
-Xms4G -Xmx4GStep 2
Identify the memory-hungry plugins with Spark
/spark heapsummaryStep 3
Keep the Xms and Xmx values equal — different values create extra problems
Step 4
Remove worlds you do not need and schedule regular restarts (once or twice a day)
Step 5
If the RAM still is not enough, upgrade your VPS plan or drop the plugins you do not need