0

So, I'm using Mojang's guide as well as a YouTube video to help me set up this server; I've been told that in the start.txt file, you can set up how much memory is used during/after startup by pasting Java -Xms512M -Xmx3.5G -jar server.jar (I changed the original minecraft_server.jar to just server.jar as that's what mine's labeled). It ran the 1.16.4 version of Minecraft, but I'm not sure why it keeps issuing a Can't keep up! Is the server overloaded? Running [x]ms or [y] ticks behind error/warning.

I just want to be able to play on my own on this sever, nevermind having others try and join (one step at a time). If anyone could help me out, or point me to a post that clearly points out that I'm having an issue someone has already had before, that would be great/

If there's also a comprehensive guide on how to setup Vanilla servers (I know a bit about computers, so it's okay if it's not for beginners) I'd greatly appreciate it.

3
  • Can you tell a bit more about your hardware? Can your computer handle running two instances of Minecraft essentially?
    – Authom
    Jan 11 at 14:51
  • Can you tell us your computer specs? Also I recommend using PaperMc (papermc.io) as PaperMc is more optimized. Jan 13 at 18:39
  • you dont need an xmx/xms command, but whats the clock on your CPU? Jan 13 at 18:48
0

The error you are receiving means that the computer can not keep up with the processing required for the game environment. This doesn't necessarily mean that the CPU is too slow to run the Minecraft server, just that there are too many things running each tick that it can not keep up with. Minecraft has 20 ticks per second, and game events are processed each tick.

Entities, animals, players, chunk generation, flowing liquid, block entities, command blocks, redstone machines, hoppers, minecarts... all these things can contribute to the processing per tick. When there is too much, the server becomes overloaded and says "Can't keep up".

If you have been doing a lot of these things very quickly in a new server and new world, then this could be the source of your problem. But if you have a new server and new world and you haven't done anything yet, then it can mean that the Minecraft server is just not efficient enough for your computer. The Minecraft server has been noted to have become harder to process over the years.

Note, you should store and run the Minecraft server data on an SSD drive. HDDs are too slow to produce good results.

More Efficient Minecraft Server

But, you are not limited to the native Minecraft server. You can use Spigot or, better yet, Paper Spigot. These are open-source server implementations that make a more efficient Minecraft server. They also allow for plugins to be installed, but I'm not going to get into that in this response. I recommend downloading Paper Spigot.

Paper Spigot runs better than the native Minecraft server, but there are also basic optimization settings you can implement that have been documented here.

Notes On Optimization

Note that with the optimization guide by celebrimbor, the final item talks about your start file java flags. You don't need a lot of ram dedicated to the server when running a simple server. 3-4gb should be fine for you, and even a couple of friends.

The optimization guide also talks about pre-generating the map. If you are playing solo, and even with a couple friends, you may not need to pregenerate the map(s). Be aware that if you did use a plugin to help do this, the world size will get big. Depending on how much you generate, this could take several GB on your storage drive. If you do generate, the plugin listed, WorldBorder, is out of date. Use Chunky or Chunkmaster instead.

The chunks around the overworld spawn point are called spawn chunks. Normally a chunk is only loaded when you are near them, and thus things inside the chunk begin processing like hoppers, mob movement... But spawn chunks remain loaded and processing wherever you are on the server. This means that it may be best not to do a lot of tick heavy things in spawn chunks, like having a giant animal farm, hopper system, redstone machine. One thing spawn chunks are good for is if you really wanted to run command blocks that affect the entire server all the time. Aside from that use, I recommend conducting your adventures away from the spawn chunks.

Lastly, Paper Spigot (and spigot) have command tools that can help to analyze what is causing lag that results in the "Can't keep up!" error. These are called Timings. If you still have problems that can not be resolved with a more efficient server and optimization, learn how to use Timings reports. They can be hard to understand, but the Spigot and Paper Spigot communities can help you read what the reports mean. There are also alternative plugins that do this.

I hope this helps get you on a path to understanding what is going on. I know it is a lot to take in right away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.