There are many different reasons to why your Minecraft server could crash. Whether it's due to mods, memory usage, plugins, or something else.
In this guide we'll be going through some of the possible reasons why your Minecraft server might be crashing and how to find the cause of the problem.
Step 1: Locating the Crash Reason
There are two ways to locate the crash reason of your server. One is to check the console when starting the server and another is to view the crash-report that gets generated.
In the following image you can see that it mentions that we're missing a dependency mod that one of our mod requires ("Zombie Horse Spawn" mod requires "Collective" mod in order to work):
Another option is to go directly to the generated crash-report.
If this is the case, it is recommended to upgrade the server. However, before proceeding, please open a ticket (click here) so our support team can confirm whether the issue is truly happening due to the server running out of memory.
Head over to the Game Panel and navigate to the "Files" tab.
Open the "crash-reports" folder and open the one at the very bottom (that is the latest crash-report).
Step 2: Finding the Cause of the Problem
As mentioned above, there can be multiple reasons why your server is crashing. Now we'll go through the most common reasons that your server might be crashing.
1. Mod Loading Error / Missing Mods
If you open the crash-report and at the top you see a text such as "Mod loading error has occured", "Missing Mods" or similar then this usually indicates that you either have an outdated mod installed or are missing some dependency mods that some mods require.
Locating the mod(s) that is/are causing this is very simple, simply scroll down to a line where you see this text (you can also use CTRL + F to search for this):
A detailed walkthrough of the error, its code path and all known details is as follows:
After this line it will start mentioning the mods that are causing the crash.
In this crash-report we can see that it's caused by the "fastbench" mod that requires "placebo" mod to work. After installing the required mod, the server starts nicely!
2. Ticking Entity
In this crash report, you can see the description being "Ticking Entity" or similar. When we scroll a little more down, we can find the exact coordinates and entity that is causing the crash.
In here we can see that the "Iron Golem" entity at "-708.04, 104.00, 296.42" coordinates is causing this. To solve the crash, we need to kill this entity - this can be done using a mod called CoFH Core. This mod is an improved version of the vanilla "/kill" command which allows you to kill entities in unloaded chunks.
Once installed and server is running, run the following command in the console "cofh killall [type]" (to kill a specific entity) or "cofh killall *" (to kill all entities).
2. Crashing Due to Plugins
This is rare, but it still happens and can be identified by keeping an eye on the console after starting the server. If you see something similar to the following:
[Server thread/ERROR]: Could not load 'plugins/EssentialsX.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.16
This clearly shows the plugin (EssentialsX) being at fault in this example. The best way to solve this is to make sure the plugin is up-to-date and supports the server version.
The best way to prevent possible crashes is to ensure that all mods are compatible with the server and have all the dependencies installed. Make sure to prevent possible plugin conflicts as well.
For more information about analyzing crashes, we recommend checking out the tutorial post on the official SpigotMC page (click here).
🎉 Congratulations, you've successfully diagnosed your server regarding crashing problems. If you have any issues or concerns, please contact us through the ticket system.