To set the stage, I'm a 20+ year IT guy who studied CompSci and is fairly proficient in OOP.
Minecraft popped up on my radar last summer when my kiddo did a day camp on MC modding. I set up a server in our house shortly afterward, using the vanilla 1.14.x branch.
I've since updated incrementally to each of the 1.15.x releases as they went GA. Usually it's just me and the two kids playing, though occasionally one of their friends will join.
Lately, and with increasing frequency, the server has been lagging out with the standard watchdog error message about a single tick taking longer than 60 seconds. Prior to these occurrences, lag is evident in the gameplay...blocks don't immediately mine, long delay in chests opening/closing, eating foods takes 10+ seconds, mobs' and other players' movements are jittery. I can tail the server log in real time and see the problem building up to a collapse. Sometimes if all players exit for a few minutes, the server will recover, but often not.
Right now, I can't seem to isolate any variable that correlates to these lag conditions. What tools are available to determine the specific task or thread in the game that's getting "hung" and causing these crashes?
[13:01:04] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2113ms or 42 ticks behind
[13:01:22] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2743ms or 54 ticks behind
[13:01:40] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3175ms or 63 ticks behind
[13:01:58] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3360ms or 67 ticks behind
[13:02:17] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4121ms or 82 ticks behind
[13:02:36] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4179ms or 83 ticks behind
[13:02:55] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3555ms or 71 ticks behind
[13:03:13] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3477ms or 69 ticks behind
[13:03:32] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3350ms or 67 ticks behind
[13:03:50] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 3616ms or 72 ticks behind
[13:04:10] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4718ms or 94 ticks behind
[13:04:30] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4915ms or 98 ticks behind
[13:04:49] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4400ms or 88 ticks behind
[13:05:09] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4651ms or 93 ticks behind
[13:05:30] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5493ms or 109 ticks behind
[13:05:49] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4790ms or 95 ticks behind
[13:06:07] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2882ms or 57 ticks behind
[13:06:26] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4039ms or 80 ticks behind
[13:06:46] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4816ms or 96 ticks behind
[13:07:06] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4683ms or 93 ticks behind
[13:07:26] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5103ms or 102 ticks behind
[13:07:45] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4827ms or 96 ticks behind
[13:08:08] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 7664ms or 153 ticks behind
[13:08:29] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 6128ms or 122 ticks behind
[13:08:49] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4961ms or 99 ticks behind
[13:09:09] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4374ms or 87 ticks behind
[13:09:28] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 4314ms or 86 ticks behind
[13:09:49] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 6272ms or 125 ticks behind
[13:10:09] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5004ms or 100 ticks behind
[13:10:30] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5762ms or 115 ticks behind
[13:10:51] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 6066ms or 121 ticks behind
[13:11:11] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5234ms or 104 ticks behind
[13:11:33] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 7033ms or 140 ticks behind
[13:11:58] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 10299ms or 205 ticks behind
[13:12:28] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 15153ms or 303 ticks behind
[13:13:10] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 26448ms or 528 ticks behind
[13:14:20] [Server Watchdog/FATAL]: A single server tick took 60.00 seconds (should be max 0.05)
[13:14:20] [Server Watchdog/FATAL]: Considering it to be crashed, server will forcibly shutdown.
[13:14:33] [Server Watchdog/ERROR]: This crash report has been saved to: /var/games/minecraft/servers/Private_Server/./crash-reports/crash-2020-04-19_13.14.33-server.txt
Any pointers or other assistance on where to look would be greatly appreciated.
I suggest bumping your Servers Ram up to 3 GB for a starter as a Minecraft server used to take around 500 MB of ram in the older version but because its a newer version its bound to take up more RAM, and players on the server take around 100 MB in the older versions so you were already cutting it close in the older versions.
Guys, I appreciate the replies, but -Xmx 10240M is giving the game's JVM 10gb of heap RAM to work with.
Oh yeah, sorry my brain just saw 1024M. I dunno dude, you have a metric tonne of arguments. I run a server with 10 to 15 people online at the same time, lots of redstone and active chunks, and besides the min/max memory argument all I have is
-XX:ParallelGCThreads=4
I was lagging pretty bad until I added that. No other arguments though, well besides -nogui
Sounds like there's something taking up all that memory, like a mob farm or resource farm that's creating a lot of entities. There's a mod called lag goggles that analyzes a server while it's running and tells you what chunks are loaded and what is going on in them. It will mark specific blocks that are using a lot of resources, but since this is vanilla, you shouldn't have issues with things like giant storage chests and machines and such. But it should tell you if there's a ton of entities somewhere that need to be eliminated. You may need to do a forge install to get it working, I'm not sure on the specifics, as that is something that's handled by the staff on the server I play on, so I just hear about it.
Rollback Post to RevisionRollBack
D_B
To tell them how to live is to prevent them living.
Y'know, as I ponder that, I'm wondering if it's being caused by the spawn chunks always being loaded and ticking.
We've built a houses and a couple fairly sizable farms (crops and mobs both) in a place on the map that's close enough to the world spawn point as to be within the 25-chunk radius that never unloads.
I'm going to experiment with moving the world spawn point a few hundred blocks into a virgin area and see if that makes a difference.
The best thing to do would be to find what's causing the lag, most likely too many entities, and fixing the cause of that, because even if you move the world spawn, those chunks will still load when a player moves into them, and if there's too many entities there, the lag will start up again. I know on the servers I play on, badly managed farms of any type are considered rude and should be designed to not cause entity overload or be removed if there's no fix.
Rollback Post to RevisionRollBack
D_B
To tell them how to live is to prevent them living.
To set the stage, I'm a 20+ year IT guy who studied CompSci and is fairly proficient in OOP.
Minecraft popped up on my radar last summer when my kiddo did a day camp on MC modding. I set up a server in our house shortly afterward, using the vanilla 1.14.x branch.
I've since updated incrementally to each of the 1.15.x releases as they went GA. Usually it's just me and the two kids playing, though occasionally one of their friends will join.
Lately, and with increasing frequency, the server has been lagging out with the standard watchdog error message about a single tick taking longer than 60 seconds. Prior to these occurrences, lag is evident in the gameplay...blocks don't immediately mine, long delay in chests opening/closing, eating foods takes 10+ seconds, mobs' and other players' movements are jittery. I can tail the server log in real time and see the problem building up to a collapse. Sometimes if all players exit for a few minutes, the server will recover, but often not.
Right now, I can't seem to isolate any variable that correlates to these lag conditions. What tools are available to determine the specific task or thread in the game that's getting "hung" and causing these crashes?
Platform Details:
Init string (includes arguments to tweak JVM garbage collection from this resource):
This is the typical log output during a failure:
Any pointers or other assistance on where to look would be greatly appreciated.
I suggest bumping your Servers Ram up to 3 GB for a starter as a Minecraft server used to take around 500 MB of ram in the older version but because its a newer version its bound to take up more RAM, and players on the server take around 100 MB in the older versions so you were already cutting it close in the older versions.
(Heres a quick guide to allocating more RAM to your server)
https://www.minecraftforum.net/forums/support/server-support-and/2457262-tutorial-allocating-more-ram-to-minecraft-servers
(Reply to this comment if it worked please)
Yeah you've got 32gb, be generous to poor minecraft and maybe even give it 4gb lol. Change "-Xmx 10240M" to "-Xmx 4G"
Guys, I appreciate the replies, but -Xmx 10240M is giving the game's JVM 10gb of heap RAM to work with.
Um sorry to break it to you but there are 1GB in 1000MB not 100MB
https://imgur.com/a/vijX6KK
Oh yeah, sorry my brain just saw 1024M. I dunno dude, you have a metric tonne of arguments. I run a server with 10 to 15 people online at the same time, lots of redstone and active chunks, and besides the min/max memory argument all I have is
-XX:ParallelGCThreads=4
I was lagging pretty bad until I added that. No other arguments though, well besides -nogui
Sounds like there's something taking up all that memory, like a mob farm or resource farm that's creating a lot of entities. There's a mod called lag goggles that analyzes a server while it's running and tells you what chunks are loaded and what is going on in them. It will mark specific blocks that are using a lot of resources, but since this is vanilla, you shouldn't have issues with things like giant storage chests and machines and such. But it should tell you if there's a ton of entities somewhere that need to be eliminated. You may need to do a forge install to get it working, I'm not sure on the specifics, as that is something that's handled by the staff on the server I play on, so I just hear about it.
D_B
To tell them how to live is to prevent them living.
Y'know, as I ponder that, I'm wondering if it's being caused by the spawn chunks always being loaded and ticking.
We've built a houses and a couple fairly sizable farms (crops and mobs both) in a place on the map that's close enough to the world spawn point as to be within the 25-chunk radius that never unloads.
I'm going to experiment with moving the world spawn point a few hundred blocks into a virgin area and see if that makes a difference.
The best thing to do would be to find what's causing the lag, most likely too many entities, and fixing the cause of that, because even if you move the world spawn, those chunks will still load when a player moves into them, and if there's too many entities there, the lag will start up again. I know on the servers I play on, badly managed farms of any type are considered rude and should be designed to not cause entity overload or be removed if there's no fix.
D_B
To tell them how to live is to prevent them living.