Common Causes of Minecraft Server Lag
The first thing to do when your server appears to be lagging is to try and isolate the cause of the lag - without knowing what is causing the problem there is no way to effectively fix or reduce it.
Restarting Your Server
Before anything else - please make sure that the issue persists after a server restart. One of the most common causes of lag - especially on Vanilla servers
- is that the server has simply not been restarted recently.
Regular restarts will unload all of the loaded chunks that are not actively in use, which reduces the server resource usage. You can set up a [scheduled task](https://help.aleforge.net/article/144-how-do-i-setup-an-automated- backup-of-my-server) to regularly restart the server for you - which we recommend setting up for every 10-12 hours at the very least.
What kind of lag is it?
Client-side Lag
If the lag does not occur for all players that are online at the time, even if they are all stood in the same part of the server world, then the problem is client-side. With client-side lag, lowering your Minecraft’s video settings can help with this - such as disabling the sky/clouds/fog, decreasing particles and lowering the chunk view radius.
By changing these settings, you reduce the amount of world data sent from the server to the client. You can also lower the servers view distance in the Server Properties tab of the AleForge Panel. By lowering the server view distance, you reduce the amount of chunks and entities loaded around each player (must be between 3 and 32, 12 by default).
Local Lag
If the lag occurs for all players on the server, but only in certain areas of the map, then it is local lag. This can be caused by a number of things in the laggy area, such as a large amount of tile/block entities, a build up of general entities such as mobs at a mob grinder/farm, or a large amount of item drops/arrows/xp orbs. Optimizing your farms to reduce lag as well as removing entities can help reduce local lag.
The same idea of local lag applies with any modded tile/block entites as well
Server-wide Lag
Server-wide lag is lag for all players at the same time regardless of where in the world they are. This most commonly caused by plugins or world errors such as entity/chunk errors or corruption. Any plugins that give errors in the console should be disabled/removed (or put on a version compatible with the server version) to see if it helps the issue.
If the lag persists when no errors are given the plugins should be disabled one at a time to make sure that no plugins are causing the issue and not giving errors to report it.
Troubleshooting Your Lag
To test whether chunk/entity error or world corruption is the cause of the lag, a new world will need to be loaded on the server.
If you have MultiWorld/MultiVerse installed these should be disabled whilst testing for chunk/entity errors or world corruption as they will still load every previous world ontop of the new one
To generate a new world, head to the AleForge Panel and go to the Server Properties section of the panel. Enter a new world name in the Level-Name field.

Hit Save at the top right of the page and restart the server Your old world will still be in the files, the Level-Name field simply dictates which folder in the server files is the world being loaded from. If it is not a name present in the files it will generate a new world in a folder with the set name.
Most cases of entity/chunk errors or world corruption will give errors in the console and/or cause crashes to make it clear that this is what is causing the issue
Fixing Chunk/Entity Errors and World Corruption
To fix these problems there are a few solutions
- A backup from before the lag started could be restored
- If there are errors specifying an entity/block problem, those entities/blocks should be removed
- AleForge can attempt a world repair if you submit a ticket requesting it. The repair would require your server to be offline for some time depending on the size of your world. If successful it would revert any problem chunks to their original state to remove the problem. However a world repair is not a guaranteed solution.
Plugin Lag
Unusual, or specific, forms of lag - such as chat lag, block lag or hit/PvP lag - can be caused by any of the above. CraftBukkit/Spigot servers are most commonly caused by faulty plugins. Any plugins, that give errors in the console should be disabled/removed to see if it helps the issue. If none of the above lag fixes help, the plugins should be disabled one at a time to make sure that no plugins are causing the issue or are not giving errors to report it.
View Distance Lag
Another common cause of lag is setting the View Distance in the server.properties too high. The higher this number is the higher the number of chunks and entities loaded around each player on the server. This can exponentially increase the servers resource/RAM usage. This number should be set between 3 and 32; with 12 being the default value. Lower numbers can improve performance but will reduce how far away from players entities/mobs will render in.
An increase in entity/chunk count can also increase the small chance of them erroring and causing chunk errors or corruption
The randomTickSpeed gamerule is another common cause of server performance
issues if it is edited. By default randomTickSpeed is set to 3. It is not
recommended to be changed unless you specifically need it changed. You
can check this with the command /gamerule randomTickSpeed and change it with
/gamerule randomTickSpeed <number>
Setting randomTickSpeed to 0 will stop a lot of server activity from working, such as crop growth
If none of the above helps, or you want us to take a look and see if we can find the cause, please contact support with as much information about the problem as you can and what you have already checked and tried to fix and we will take a look at things for you!