SparklyPower / SparklyPaper

✨ "Ooooh, sparkly paper!" - SparklyPower's Paper fork, making large servers snappier with high-performance optimizations and improvements!
https://sparklypower.net/
105 stars 13 forks source link

Error that cause huge TPS drop #26

Closed DaddyRobLIVE closed 1 month ago

DaddyRobLIVE commented 1 month ago
[13:29:25 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - 1.20.6-DEV-6df23d1 (MC: 1.20.6) ---
[13:29:25 ERROR]: The server has not responded for 15 seconds! Creating thread dump
[13:29:25 ERROR]: ------------------------------
[13:29:25 ERROR]: Server thread dump (Look for plugins here before reporting to SparklyPaper!):
[13:29:25 ERROR]: ------------------------------
[13:29:25 ERROR]: Current Thread: Server thread
[13:29:25 ERROR]:       PID: 44 | Suspended: false | Native: true | State: RUNNABLE
[13:29:25 ERROR]:       Stack:
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.UnixFileDispatcherImpl.write0(Native Method)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.UnixFileDispatcherImpl.write(UnixFileDispatcherImpl.java:65)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:137)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.IOUtil.write(IOUtil.java:102)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.IOUtil.write(IOUtil.java:72)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:300)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.ChannelOutputStream.writeFully(ChannelOutputStream.java:68)
[13:29:25 ERROR]:               java.base@21.0.3/sun.nio.ch.ChannelOutputStream.write(ChannelOutputStream.java:105)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:125)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.BufferedOutputStream.implFlush(BufferedOutputStream.java:252)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:240)
[13:29:25 ERROR]:               java.base@21.0.3/java.util.zip.DeflaterOutputStream.flush(DeflaterOutputStream.java:290)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.BufferedOutputStream.implFlush(BufferedOutputStream.java:253)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:240)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.DataOutputStream.flush(DataOutputStream.java:131)
[13:29:25 ERROR]:               java.base@21.0.3/java.io.FilterOutputStream.close(FilterOutputStream.java:184)
[13:29:25 ERROR]:               net.minecraft.nbt.NbtIo.writeCompressed(NbtIo.java:222)
[13:29:25 ERROR]:               net.minecraft.nbt.NbtIo.writeCompressed(NbtIo.java:174)
[13:29:25 ERROR]:               net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:617)
[13:29:25 ERROR]:               net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:608)
[13:29:25 ERROR]:               net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1517)
[13:29:25 ERROR]:               net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1597)
[13:29:25 ERROR]:               net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1236)
[13:29:25 ERROR]:               net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:328)
[13:29:25 ERROR]:               net.minecraft.server.MinecraftServer$$Lambda/0x00007fc930cd2430.run(Unknown Source)
[13:29:25 ERROR]:               java.base@21.0.3/java.lang.Thread.runWith(Thread.java:1596)
[13:29:25 ERROR]:               java.base@21.0.3/java.lang.Thread.run(Thread.java:1583)
[13:29:25 ERROR]: ------------------------------
[13:29:25 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[13:29:25 ERROR]: ------------------------------

My server freezes and this error appears.

MrPowerGamerBR commented 1 month ago

So, even tho this issue is closed, I actually had that issue, but I couldn't track down if this was a SparklyPaper issue or if it was a storage issue, because SparklyPaper does not change anything on that code path, and the stack trace shows that the code is stuck trying to write data to the disk. And in my experience I found out that the thread does get unstuck after a while, which can point to an issue on the storage itself (slow writes?)

DaddyRobLIVE commented 1 month ago

I recently installed a realm plugin on my server which adds a lot of private world for players use. I'm guessing this error happens since I have about 300+ worlds and they're saving all at once during the auto-save tick.