Startup Issue with Minecraft - Server stalls randomly under different loads

System Information

Field Value
Operating System Windows - Windows 11 Home on x86_64
Product AMP ‘Callisto’ v2.5.1.0 (Mainline)
Virtualization None
Application Minecraft
Module MinecraftModule
Running in Container No
Current State Ready

Problem Description

Issue

Server goes unresponsive after random amount of time has passed, I have tried modded and unmodded servers same issue persists. I am hosting locally connecting directly to server address 0. No crash logs or errors in latest.log I have been trying to debug using spark but since this happens randomly I can not pinpoint what is causing the issue, can not run spark profile after server times out. Running forge 47.1.106 MC 1.20.1

Reproduction Steps

  • Start Server
  • Play for X minutes
  • Server kicks all players with “Server timed out”
  • Unable to rejoin server

Got it, thanks for the details! Let’s start by checking the server logs to see if there’s anything unusual just before the server goes unresponsive. Could you upload or paste the relevant parts of your latest.log file? Focus on the sections right before the server times out.


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

[17Jul2024 14:36:53.422] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER] - Pastebin.com latest.log via pastebin

For security reasons, I can’t access external links. Please copy and paste the relevant sections of your latest.log here, especially the part right before the server goes unresponsive.


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

[17Jul2024 15:30:00.357] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.201 ms. Mean TPS: 20.000
[17Jul2024 15:30:00.357] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 14.412 ms. Mean TPS: 20.000
[17Jul2024 15:30:02.911] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Bkoe has made the advancement [Cover Me with Diamonds]
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 11.187 ms. Mean TPS: 20.000
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.206 ms. Mean TPS: 20.000
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.237 ms. Mean TPS: 20.000
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.165 ms. Mean TPS: 20.000
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.244 ms. Mean TPS: 20.000
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.221 ms. Mean TPS: 20.000
[17Jul2024 15:31:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 15.936 ms. Mean TPS: 20.000
[17Jul2024 15:31:38.769] [Server thread/WARN] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Horse (vehicle of Bkoe) moved wrongly! 0.3655429434006692
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 11.263 ms. Mean TPS: 20.000
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.215 ms. Mean TPS: 20.000
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.251 ms. Mean TPS: 20.000
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.236 ms. Mean TPS: 20.000
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.360 ms. Mean TPS: 20.000
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.340 ms. Mean TPS: 20.000
[17Jul2024 15:32:00.409] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 16.513 ms. Mean TPS: 20.000
[17Jul2024 15:32:57.509] [pool-23-thread-3/INFO] [Supplementaries/]: Searching for closest structure among [ResourceKey[minecraft:worldgen/structure / ctov:small/village_plains_fortified], ResourceKey[minecraft:worldgen/structure / ctov:medium/village_taiga_fortified], ResourceKey[minecraft:worldgen/structure / ctov:medium/village_plains], ResourceKey[minecraft:worldgen/structure / ctov:large/village_mountain_alpine], ResourceKey[minecraft:worldgen/structure / ctov:medium/village_swamp_fortified], ResourceKey[minecraft:worldgen/structure / ctov:medium/village_mountain_alpine], ResourceKey[minecraft:worldgen/structure / ctov:medium/village_desert_oasis], ResourceKey[minecraft:worldgen/structure / ctov:large/village_savanna_na]] from pos BlockPos{x=709, y=95, z=2565}
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 9.710 ms. Mean TPS: 20.000
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.166 ms. Mean TPS: 20.000
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.224 ms. Mean TPS: 20.000
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.179 ms. Mean TPS: 20.000
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.215 ms. Mean TPS: 20.000
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.149 ms. Mean TPS: 20.000
[17Jul2024 15:33:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 13.703 ms. Mean TPS: 20.000
[17Jul2024 15:33:58.395] [Server thread/INFO] [APTweaks(Core)/]: [APTweaks:Core] ? Server load changed from VERY_LOW (avg. 14.184324264526367) to LOW (avg. 22.954181671142578)
[17Jul2024 15:34:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 13.010 ms. Mean TPS: 20.000
[17Jul2024 15:34:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.167 ms. Mean TPS: 20.000
[17Jul2024 15:34:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.252 ms. Mean TPS: 20.000
[17Jul2024 15:34:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.160 ms. Mean TPS: 20.000
[17Jul2024 15:34:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.225 ms. Mean TPS: 20.000
[17Jul2024 15:34:00.411] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.166 ms. Mean TPS: 20.000
[17Jul2024 15:34:00.411] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 17.420 ms. Mean TPS: 20.000
[17Jul2024 15:34:05.895] [Server thread/INFO] [APTweaks(Core)/]: [APTweaks:Core] ? Server load changed from LOW (avg. 22.954181671142578) to VERY_LOW (avg. 15.773683547973633)
[17Jul2024 15:34:20.894] [Server thread/INFO] [APTweaks(Core)/]: [APTweaks:Core] ? Server load changed from VERY_LOW (avg. 15.773683547973633) to LOW (avg. 21.0628604888916)
[17Jul2024 15:34:28.395] [Server thread/INFO] [APTweaks(Core)/]: [APTweaks:Core] ? Server load changed from LOW (avg. 21.0628604888916) to VERY_LOW (avg. 16.396358489990234)
[17Jul2024 15:34:49.389] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Bkoe has made the advancement [A Moment in Time]
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 9.823 ms. Mean TPS: 20.000
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.152 ms. Mean TPS: 20.000
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.165 ms. Mean TPS: 20.000
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.127 ms. Mean TPS: 20.000
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.171 ms. Mean TPS: 20.000
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.129 ms. Mean TPS: 20.000
[17Jul2024 15:35:00.407] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 13.359 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 9.843 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.212 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.123 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.162 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.134 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.236 ms. Mean TPS: 20.000
[17Jul2024 15:36:00.410] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 13.591 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:overworld (minecraft:overworld): Mean tick time: 11.039 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_nether (minecraft:the_nether): Mean tick time: 0.166 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim twilightforest:twilight_forest (twilightforest:twilight_forest_type): Mean tick time: 0.164 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim minecraft:the_end (minecraft:the_end): Mean tick time: 0.153 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim deeperdarker:otherside (deeperdarker:otherside): Mean tick time: 0.157 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dim aether:the_aether (aether:the_aether): Mean tick time: 0.167 ms. Mean TPS: 20.000
[17Jul2024 15:37:00.408] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Overall: Mean tick time: 15.279 ms. Mean TPS: 20.000
[17Jul2024 15:37:21.423] [Server thread/WARN] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Horse (vehicle of Bkoe) moved wrongly! 0.2793476439429696
[17Jul2024 15:37:28.395] [Server thread/INFO] [APTweaks(Core)/]: [APTweaks:Core] ? Server load changed from VERY_LOW (avg. 16.08445167541504) to LOW (avg. 23.701152801513672)
[17Jul2024 15:37:43.394] [Server thread/INFO] [APTweaks(Core)/]: [APTweaks:Core] ? Server load changed from LOW (avg. 23.701152801513672) to VERY_LOW (avg. 19.292024612426758)

It looks like your server’s tick times and TPS are consistently good, which is a positive sign. The Horse moved wrongly! warnings are generally harmless and indicate minor desyncs.

Given that the server becomes unresponsive without logs indicating a crash or error, the issue might be related to resource limits, such as memory or CPU, or potentially network issues.

Let’s check a few things:

  1. Memory Usage: Ensure the server has enough allocated memory, and monitor it while the server is running.
  2. CPU Usage: Monitor the CPU usage during server operation to see if there are any spikes.
  3. Network: Verify your network stability. You can use a tool like ping or tracert to check for any irregularities.

You can also try the following command to see if any ports are being blocked:

ampinstmgr ports [INSTANCENAME]

Replace [INSTANCENAME] with the name of your Minecraft instance.

Can you confirm if these resource usages are within normal ranges or share any unusual findings?


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

They are within normal ranges, I have tried allocating anywhere from 4gb-20gb of ram. My cpu load ranges from 30-80% consistently

Thanks for the info. Since your resource usage is within normal ranges, it might be a specific mod causing the issue, especially since it happens both modded and unmodded. Here are a few more things to consider:

  1. Update Mods and Forge: Ensure all mods and Forge are up to date.
  2. Check Mod Compatibility: Some mods might not play well together. Try running the server with a minimal set of mods and gradually add them back.
  3. Test Without Mods: Although you mentioned it happens unmodded as well, make sure to test with a clean installation to rule out any lingering issues from previous mods.

Lastly, let’s run ampinstmgr dumpfirewall to check AMP’s view of the firewall situation:

ampinstmgr dumpfirewall

Share the output from this command to see if there are any unexpected firewall rules.


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

I have tested modded and unmodded versions with and without amp. Amp isnt the issue but was hoping for some support if possible

Understood, thanks for clarifying. Since the problem persists with and without AMP and across different configurations, we might need to delve deeper.

  1. Check Java Version: Ensure you are using the latest stable version of Java. Minecraft servers typically run best on the latest LTS version of Java. Verify the Java version with:

    java -version
    
  2. Garbage Collection: Java’s garbage collector can sometimes cause hiccups. You might want to experiment with different garbage collection settings. For example:

    -Xmx20G -Xms20G -XX:+UseG1GC
    
  3. Network Configuration: Ensure there are no network issues. This includes checking for any ISP-related issues, router configurations, or even trying a different network.

  4. Operating System Logs: Check Windows Event Viewer for any system logs or errors that coincide with the server becoming unresponsive.

If none of these help, it might be beneficial to run a detailed profiler on your server to catch the issue as it happens. Spark is a good choice, but considering the randomness, you might want to run it continuously with lower overhead.

If you have any specific findings or need further assistance with a particular aspect, let me know!


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

Im not seeing anything in windows event viewer related to java around the time of the crash. I am running java 17 eclipse I have tried different GC’s and same result

Alright, thanks for the detailed troubleshooting. Given that none of the usual suspects seem to be the cause, let’s try running a continuous profiler with Spark to see if we can capture more detailed information.

Here’s how you can run Spark in continuous mode:

  1. Install Spark:

    /spark
    
  2. Run Spark in Background:
    Set Spark to start profiling continuously. You can do this by starting it with a command and letting it run in the background:

    /spark profiler --continuous --interval 60
    
  3. Check Spark Output:
    After the server becomes unresponsive again, check Spark’s output to see if it has captured anything unusual.

  4. Post-Analysis:
    If Spark captures any relevant data, please share the findings here, and we can analyze it further.

While Spark is running continuously, ensure you keep an eye on the server’s performance to avoid any additional load. This might give us more insights into the root cause of the issue.


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

Apollo disengage from this thread please. This is not a good path forward.

1 Like

I’m sorry I couldn’t resolve your issue. A human from CubeCoders will assist you shortly. Thank you for your patience!


:robot: This post was produced by an AI controlled by CubeCoders Limited - Feedback

@Bkoe Can you try using the Adoptium JDK instead please? Whatever the newest version is that will work with your MC server which will likely be version 21.

@Mike I am currently running 17.0.11 by Eclipse Adoptium; OS Windows 11 arch amd64 version 10.0 for Minecraft Forge 1.20.1. Should I upgrade to 21? As far as I knew for 1.20.1 I should be on 17

Worth a shot because if it happens without mods its either that or a hardware/OS level issue.

Java 21 used less ram thats for sure but same issue, server still timed out. Could it be the watchdog or would there be an error in the logs if that were the case?

There would be yes. Does the Java process actually end? Or does it just stall in place?

1 Like

It stalls in place, AMP thinks the server is still running but its stalled out. Even when Im not playing and I close all running programs my friends join and it stalls on them too.