Cold Sweat

Cold Sweat

1M Downloads

[1.18.2] Crash server tick loop + finishConnect(..) failed: Connection refused

DeshiDesu opened this issue ยท 8 comments

commented

ColdSweat-2.2-b03d.jar
MC 1.18.2
Forge 40.2.0

My server crashed and my client disconnected with the error message finishConnect() failed connection

Logs:
https://mclo.gs/XJUcYlr

commented

That's alright. I'll close this, then

commented

nvm i forgot to delete old configs

commented

I've got it working after I upgraded to forge 40.2.1 but the server tps was still bad (about 1-15 tps)

commented

Ok, before you keep sending messages, please take a moment do a little more digging and tell me what you find. This is an issue tracker, not a DM.

The best way to diagnose server lag is to use Spark (https://www.curseforge.com/minecraft/mc-mods/spark). By taking a 60-second sample, you can see exactly what mods are causing the lag. You can use this command to get the sample, and after the 60 seconds have elapsed it will send a link to the profiler results in chat:
/spark profiler --timeout 60

Please send me the link when you do this.

commented

Still crashed even with deleted old configs

commented

does not look different from the last log: https://mclo.gs/dxqGHPG

commented

I was not thinking when I sent those messages, I sincerely apologize. I followed your advice and here's the link you asked for: https://spark.lucko.me/wccyVQVGzz

commented

No worries, just trying to keep things organized. Thanks for the link. Looking at the sources of the lag, it seems like a lot of mods are running pretty slowly, with Cold Sweat being impacted the most.

I'm seeing an abnormally high amount of parkNanos() which is triggered when the game is waiting for the server thread to be free so it can be assigned more tasks to do. The server completely stalls during this time, which is usually perceived as "lag".

I'm no expert on how threads work exactly, but I've mainly seen this issue occur when there are multiple programs open that share the same thread on your CPU. This means Windows (or whatever operating system you're using) has to "share" the thread between all of those programs, bouncing it back and forth between them.
Not only does this mean that a large chunk of your CPU's processing power on that thread is going toward something other than the Minecraft server, but the act of switching the thread between programs also takes some time, which could be bad as well.

Again, I have very little knowledge of this issue, but my suggestion as a first troubleshooting step would be to make sure you don't have too many programs open on the server host machine, and that the server has enough RAM (since it might also be that the server is waiting for data to enter/exit RAM because there isn't enough to keep all data loaded all the time)