Recent Discussions

Why does my server hang when players are moving fast in spectator mode?

Unanswered
Barbary Lion posted this in #questions
Messages33 messages
Views0 views
Barbary LionOP
Java 1.21.4
running https://github.com/itzg/docker-minecraft-server and i set the container to have 32G of a ram, but the minecraft java memory option has 16G of a ram

if i put a player into spectator mode and they want to explore when they start moving towards pieces of the map they haven't been to before the game just hangs for everyone on the server and can cause disconnects.

this is even from a fresh reboot. server wouldn't be online more than a few minutes and if you try again it will happen.

the server is barely being utilized -- cpu basically sits near 0 and the memory isn't even close to maxing.

how can I make this a better experience?
@Barbary Lion Java 1.21.4
running
https://github.com/itzg/docker-minecraft-server and i set the container to have 32G of a ram, but the minecraft java memory option has 16G of a ram

if i put a player into spectator mode and they want to explore when they start moving towards pieces of the map they haven't been to before the game just hangs for everyone on the server and can cause disconnects.

this is even from a fresh reboot. server wouldn't be online more than a few minutes and if you try again it will happen.

the server is barely being utilized -- cpu basically sits near 0 and the memory isn't even close to maxing.

how can I make this a better experience?
Why do you have people on spectator mode running around exploring chunks?
@Tamz Why do you have people on spectator mode running around exploring chunks?
Barbary LionOP
because thats how they want to play lol
That’s pretty bad, spectator mode full speed. I’ve never seen work without destroying the game
You might want to see if there’s a plug-in out there or some sort of mod that limits the spectator mode speed to a certain amount and you can’t go over that amount
like just barely faster than a elytra speed
Barbary LionOP
what's the actual cause of the problem? is it the server can't load in the chunks fast enough?
@Barbary Lion what's the actual cause of the problem? is it the server can't load in the chunks fast enough?
how many players do you have that are able to do this or is everyone and if it’s everyone how many is everyone?
because I’m gonna give an example of three people are spectator and they decide all randomly at the same time to go in different directions full speed
And your server view distance is 10 so the way Minecraft is trying to do this is they’re trying to generate a total of 10 chunk radius is around side player as fast as I can and if you don’t have basically a super computer of a CPU, it’ll lag horribly
And then at a certain point when it’s generating chunks it’ll freeze because it’s so laggy it’ll try on freezing, but there is such a backlog of ungenerated chunks that it has to catch up on. It decides to crash because that would be easier than generating those chunks.
@Tamz how many players do you have that are able to do this or is everyone and if it’s everyone how many is everyone?
Barbary LionOP
only 3 people on the server max, just me and my kids.

generally only one is a spectator
gotcha
Barbary LionOP
my cpu is a 3700x and it's the only thing the server is doing, is increasing the view distance a thing? or would pre-generating chunks help with /chunky? i looked into it before but really didn't do what i wanted easily
Polish
If you provide a spark report, it should help understand if it's chunk load or chunk generation causing the slowdown
But pre-generating chunks will offload the burden of chunk generation when exploring pre-generated areas
^
Polish
If you run paper, you can also spread the loading of chunks across multiple cores with async chunk loading
So then chunk generation or disk performance becomes the main bottleneck
The bigger issue is if people are exploring in a straight line outwards from the centre of the world, pre-generating becomes difficult to do, unless you also add a world border
@Barbary Lion my cpu is a 3700x and it's the only thing the server is doing, is increasing the view distance a thing? or would pre-generating chunks help with /chunky? i looked into it before but really didn't do what i wanted easily
Ruddy Ground-Dove
You want the clients to have bobby or distant horizons on a Fabric modpack and you want to pregen the server.

Get ready for days of pregen and like 80 gigs of minecraft.
But Silent is correct. If it’s just a straight line outward from spawn then it’s difficult.
@Ruddy Ground-Dove You want the clients to have bobby or distant horizons on a Fabric modpack and you want to pregen the server.

Get ready for days of pregen and like 80 gigs of minecraft.
Barbary LionOP
Space is not an issue but my question is is there any downside to regenerating chunks like this?
Bobby is a mod?
I'm using fabric
Ruddy Ground-Dove
Pregenerating chunks has the downside of it takes ages to do, it's computationally expensive, and it'll take heaps of space.
Barbary LionOP
The one thing I may thought about regenerating chunks is that if I update the game those particular chunks may not receive whatever updates they could?
Loading...