Unreliable minecraft server, server can't keep up.

April 6, 2019 9.1k views
DigitalOcean Ubuntu 18.04

Hello,

I have recently set up a minecraft server on a 2GB RAM droplet.
I have assigned the server 1950MB of ram and also added swap. (The server is not running on root, but on a separate user with sudo privileges.)
However, quite frequently the whole server shuts down because it can’t keep up.
Example: [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 61557ms or 1231 ticks behind

To my understanding it can’t process the calculations and gets behind, but the CPU usage seems fine when I looked the chart.

I don’t really know why this happens, does anyone have a solution for this, or know why this is happening?

2 Answers

Unfortunately there isn’t enough info posted to really dig into why you are getting this error but I’ll try and help the best I can.

A few things you’ll need to provide:

What java version did you install?
How many cores?
What type of server? Vanilla? Any mods?
How many players?
What are your arguements are you using when launching your server?

This error is somewhat common and often happens when the world is generating new chunks. While Minecraft server will only use a single core, other tasks will utilize other cores / threads.

The most common causes are:

CPU: possibly needs more cores assigned. I use 2 for mine but it’s a vanilla survival server with two players.

RAM: Check your start up arguments for Minecraft server. You can set the amount of RAM Minecraft starts with and it’s maximum. Make sure to your droplet has enough total RAM for both the operating system AND Minecraft. If your droplet only has 2 gigs and you allocated most of it to Minecraft, that’s likely why it’s crashing. I would go with with 6GB total for the droplet, set your server start arguments to start Minecraft with 512MB and 4GB max

-Xms512MB -Xmx4G

This is just a suggestion as a starting point. Your startup arguments could vary depending on your server type, players, mods, world size, etc.

Disk: Slow disk I/O, fragmentation, improper config.

I think it might be like you said, that I might need another cpu, or that I’m allocating too much RAM, I’ll try the ram thing first and see if it fixes the problem. Thanks for the help! :)

What java version did you install?
openjdk version “10.0.2”
I installed the java through sudo apt-get install default-jdk

How many cores?
1 core with 2GB RAM.

What type of server? Vanilla? Any mods?
Vanilla server.

How many players?
1-4 players logged in at the same time usually. I would like to support around 10 if possible.

What are your arguements are you using when launching your server?
I use java -Xmx1950M -Xms1950M -jar minecraft_server.jar nogui
I used this tutorial when creating the server: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-minecraft-server-on-linux

by Etel Sverdlov
This tutorial covers setting up a minecraft server on linux. In order to ensure exiting out of the droplet does not impact your server, this tutorial also provides instructions on how to go through the installation and start your server within screen. This tutorial is written for Ubuntu.
Have another answer? Share your knowledge.