Private server freezing
Hi.
I'm trying to host a private modless Java server for myself and friends (max 10 online at any time). I'm running the server on a separate windows machine with only the server on it. We followed the "common instructions" we found online on a wiki to set it all up.
Things worked fine for a week or two but then Windows restart caused an improper shutdown and the server would randomly start to freeze, and never unfreeze, forcing us to ctrl-alt-delete to shut it down.
We thought it got corrupted due to the restarting/shutting it down without /stop, so after a lot of testing and attempting to restore data or fiddle with RAM settings, we made a new world and started from scratch.
Worked fine again for a week or two and now it started freezing again, unprompted. We thought it might be a UUID issue but our attempts to resolve those did nothing.
The server isnt actually crashing so we dont get error messages or crash reports, but it's also not temporarily freezing from lag.
The internet is sadly very outdated, unprecise, unrelated or contradictory, and we are not very knowledgeable regarding Minecraft. The Minecraft reddit suggested we ask for help here, so, any ideas? :/
I can post more info if needed.
38 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by sacropedia#0
are their any server logs?
errors or anything*
!spark
Spark Profiler
Spark can be used to see why your server or client is lagging.
https://spark.lucko.me/
Admincraft Canned Responses
Yeah I heard spark can check why it's lagging, but to clarify it's not lagging, it's freezing. As in the GUI window is unselectable and unresponsive, console commands dont work (and cant type anything beyond the first command). The logs are not showing anything beyond the point of freezing and no anomalies before that, and we get no error/crash message before it freezes. That's largely why we are having issues identifying what is actually wrong.
I dont actually know what Spark is though. Could it possibly identify this type of issue too?
The server works without lag until it suddenly freezes completely, so that's why I didnt bother looking into it beyond reading it diagnoses lag.
Spark is used to diagnose any performance issues
Including freezing
Do you mean the GUI as in the ingame GUI or the server console GUI?
The server GUI, the one you can toggle with --nogui
Aha
Okay well I dont know enough about self hosting to help u with that lol
Ok ty anyway, I will read up more on Spark and see if I can understand how to test with it
Yeah I think spark wont really tell you a lot in this case, maybe its because your pc is running out of RAM?
Well we tried to look for guidelines on how much RAM would be required/recommended for the amoubt of players we have (10 or less) but everything seemed contradictory on the internet so we are still unclear
Yeah its all kinda wack, it depends on a looooot of things
Your server is completely vanilla right?
Yes, no mods, default settings except lowered view range and sync-chunk-writes set to false (since we suspected RAM and tried to find solutions in case that was it)
We've turned off console quickEdit, postponed windows updates, not running anything else on the computer. 16GB RAM available.
What are your startup args?
And its on a completely seperate computer right?
java -xms4G -Xmx8G -jar servername.jar
pause
Yes, separate windows computer specifically to be used as server only
How much physical memory does the pc have?
Oh 16
Missed that :4371cough:
Are you using the vanilla server jar? Downloaded from Mojang directly?
We specifically followed the instructions from https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_server#Common_instructions which yes, includes a link to Mojang's download page
Minecraft Wiki
Setting up a server
This tutorial takes you through the steps of setting up your own Java Edition server using the default server software that Mojang Studios distributes free of charge. The software may be installed...
Sorry my Discord mojo on phone is a bit lacking.
We've tried multiple different xms and xmx combinations as well
Alright hmmm
Try lowering the xmx to 6GB, it should run just the same.
Vanilla minecraft uses very little memory for the server, it's mostly just Java memory reservation you see.
We've had it at that before, and lower, to no avail, but I'm not opposed to trying it again if it will help troubleshoot anew.
(we also bumped it to 15G for a bit, still froze)
What bothers me the most is that we have played fine with these settings for almost 2 weeks since we remade the new world and started from scratch. Then poof, freeze. And since then, almost immediate freeze less than 1h into playing.
Don't know if you or anyone else here has heard of it but I would maybe install MCSS and try to use it. It manages the console in a different way that might allow you to see the error
It also allows for easier management and control settings
Maybe you can try other operating systems such as ubuntu
I'm not familiar with MCSS, what is it?
its a windows only server management software.
similar to panels like ptero and such now
before it was just a basic turn on/off but now its adding things like a web panel and such
Im afraid no one in our circle has any experience with other operating systems
Hi, on ubuntu you can install pterodactyl panel(it's easy, just read documentation) and you can manage your server more easily
if your deadset on windows though(or you don't want to learn linux at all) you can use mcss
i think ptero would be better because ubuntu has a much lower overhead and such
but I can also see the benefits(for some people) of hosting on a windows machine
mcserversoft.com is the site for mcss
Knowing my brother (who owns the server computer), I dont believe changing operating system is going to be possible for us unfortunately.
I'll look up MCSS, thank you
yep
so I looked up MCSS on their website, but as usual instructions unclear. I downloaded MCSS, dl'd a fresh .jar from mojang, and selected to create a new server in MCSS targeting the fresh .jar file. I manually edited settings to be the same as what we had previously and doublechecked the EULA and server.properties to make sure they were as intended.
However, when I try starting the server in MCSS, it starts generating the spawn area but gets stuck on 15-20% and just wont move whatsoever. I dont have any alerts, I've given MCSS all permissions it asked for, and the computer is not reporting any unusual memory/cpu issues. I'm completely at a loss...
Why no one asked for the CPU
On what CPU the server is running on
Because what CPU it's on would hardly have any effect on the process itself just simply stop existing.
OS issue it is
sorry mate
My bet is still on "JVM is reserving more memory than the OS has free".
And since the only response I got to that was "I tried giving java more memory and it still froze", I unfollowed thread
How much memory does the computer have? Does the process show up in task manager? how much memory are you allocating to the server? what does task manager say resource usage is?
I suppose I just didn't entirely understand what you meant, my apologies.
The computer has 16GB RAM. The MCSS process does show up in task manager, with 3-4 subprocesses (2 Java, one of which is paused after freeze, and 1 MCSS, sometimes Console Window Host). By allocating I assume you mean the xms and xmx args, which through MCSS are now set to 1024MB and 6GB respectively. Watching task manager as it starts up through MCSS, the CPU spikes to 75% usage right before it freezes, while memory is stuck at 1760MB.
Is MCSS just taking more CPU than our previous startup method then?
servers usually use a really high amount of cpu during startup. I would reduce the xms value to something like 128mb or 512mb. I would also check event viewer to see if anything is showing their.
Alright, I've never used the event viewer before so I'll go see if I can learn that and report back if it shows anything. Thank you. (set xms to 256MB and it froze while generating, just fyi)