DiscordSRV

DiscordSRV

86.8k Downloads

this is causing my server to have lag spikes and get everyone timed out

TitaniumTries opened this issue ยท 1 comments

commented

Expected behavior

[09:02:06 WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[09:03:39 WARN]: io.netty.channel.unix.Errors$NativeIoException: writeAddress(..) failed: Connection reset by peer
[09:03:39 ERROR]: [DiscordSRV] [JDA] Encountered exception trying to execute request
java.lang.IllegalStateException: Could not acquire lock in a reasonable timeframe! (10 seconds)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.api.utils.MiscUtil.tryLock(MiscUtil.java:169)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.api.utils.MiscUtil.locked(MiscUtil.java:131)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter.getBucket(BotRateLimiter.java:315)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter.getRateLimit(BotRateLimiter.java:196)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:147)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:141)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:124)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831

Actual behavior

[09:02:06 WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[09:03:39 WARN]: io.netty.channel.unix.Errors$NativeIoException: writeAddress(..) failed: Connection reset by peer
[09:03:39 ERROR]: [DiscordSRV] [JDA] Encountered exception trying to execute request
java.lang.IllegalStateException: Could not acquire lock in a reasonable timeframe! (10 seconds)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.api.utils.MiscUtil.tryLock(MiscUtil.java:169)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.api.utils.MiscUtil.locked(MiscUtil.java:131)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter.getBucket(BotRateLimiter.java:315)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter.getRateLimit(BotRateLimiter.java:196)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:147)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:141)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:124)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831

Steps to reproduce

[08:05:45 INFO]: [SkinsRestorer] ----------------------------------------------
[08:05:45 INFO]: [PvPManager] No update found
[08:05:45 INFO]: [DriveBackupV2] Checking for updates...
[08:06:14 INFO]: Please wait at least 3 minutes before generating a Timings report. Unlike Timings v1, v2 benefits from longer timings and is not as useful with short timings. (151 seconds)
[08:11:32 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-279 (MC: 1.17.1) ---
[08:11:32 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[08:11:32 ERROR]: ------------------------------
[08:11:32 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[08:11:42 ERROR]: ------------------------------
[08:11:42 ERROR]: Current Thread: Server thread
[08:11:42 ERROR]: PID: 20 | Suspended: false | Native: false | State: RUNNABLE
[08:11:42 ERROR]: Stack:
[08:11:42 WARN]: Can't keep up! Is the server overloaded? Running 19188ms or 383 ticks behind
[08:11:42 ERROR]: PvPManager.jar//me.NoChance.PvPManager.Libraries.Metrics.Metrics$MetricsBase$$Lambda$6917/0x00000008021375d8.apply(Unknown Source)
[08:11:42 ERROR]: [email protected]/java.util.stream.SpinedBuffer.asArray(SpinedBuffer.java:214)
[08:11:42 ERROR]: [email protected]/java.util.stream.Nodes$SpinedNodeBuilder.asArray(Nodes.java:1304)
[08:11:42 ERROR]: [email protected]/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:617)
[08:11:42 ERROR]: PvPManager.jar//me.NoChance.PvPManager.Libraries.Metrics.Metrics$MetricsBase.submitData(Metrics.java:245)
[08:11:42 ERROR]: PvPManager.jar//me.NoChance.PvPManager.Libraries.Metrics.Metrics$MetricsBase$$Lambda$6914/0x0000000802136b10.run(Unknown Source)
[08:11:42 ERROR]: app//org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[08:11:42 ERROR]: app//org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[08:11:42 ERROR]: app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1559)
[08:11:42 ERROR]: app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:479)
[08:11:42 ERROR]: app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1475)
[08:11:42 ERROR]: app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1274)
[08:11:42 ERROR]: app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[08:11:42 ERROR]: app//net.minecraft.server.MinecraftServer$$Lambda$3663/0x00000008013c7330.run(Unknown Source)
[08:11:42 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:831)
[08:11:42 ERROR]: ------------------------------
[08:11:42 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[08:11:42 ERROR]: ------------------------------
[08:43:36 WARN]: Can't keep up! Is the server overloaded? Running 5670ms or 113 ticks behind
[08:45:58 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-279 (MC: 1.17.1) ---
[08:45:58 ERROR]: The server has not responded for -84 seconds! Creating thread dump
[08:45:58 ERROR]: ------------------------------
[08:45:58 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[08:45:58 WARN]: Can't keep up! Is the server overloaded? Running 112436ms or 2248 ticks behind
[08:45:58 ERROR]: ------------------------------
[08:45:58 ERROR]: Current Thread: Server thread
[08:45:58 ERROR]: PID: 20 | Suspended: false | Native: false | State: TIMED_WAITING
[08:45:58 ERROR]: Stack:
[08:45:58 ERROR]: [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
[08:45:58 ERROR]: [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
[08:45:58 ERROR]: app//net.minecraft.util.thread.BlockableEventLoop.waitForTasks(BlockableEventLoop.java:144)
[08:45:58 ERROR]: app//net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:133)
[08:45:58 ERROR]: app//net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1367)
[08:45:58 ERROR]: app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1278)
[08:45:58 ERROR]: app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[08:45:58 ERROR]: app//net.minecraft.server.MinecraftServer$$Lambda$3663/0x00000008013c7330.run(Unknown Source)
[08:45:58 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:831)
[08:45:58 ERROR]: ------------------------------
[08:45:58 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[08:45:58 ERROR]: ------------------------------
[08:48:19 WARN]: Can't keep up! Is the server overloaded? Running 6784ms or 135 ticks behind
[08:48:44 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-279 (MC: 1.17.1) ---
[08:48:46 ERROR]: The server has not responded for -1 seconds! Creating thread dump
[08:48:46 ERROR]: ------------------------------
[08:48:46 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[08:48:59 ERROR]: Ticking entity: minecraft:strider, entity class: net.minecraft.world.entity.monster.EntityStrider
[08:48:59 WARN]: Can't keep up! Is the server overloaded? Running 9206ms or 184 ticks behind
[08:49:01 ERROR]: Entity status: removed: false, valid: true, alive: true, is passenger: false
[08:49:10 ERROR]: Entity UUID: 2c5eaa09-4c5c-4676-8878-61021f5d79eb
[08:49:11 ERROR]: Position: world: 'world_nether' at location (-104.48682422775185, 31.5, -67.5)
[08:49:56 ERROR]: Velocity: (0.0, -0.0784000015258789, 0.0) (in blocks per tick)
[08:50:54 WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[08:51:41 ERROR]: Entity AABB: AABB[-104.93682421583092, 31.5, -67.94999998807907] -> [-104.03682423967278, 33.200000047683716, -67.05000001192093]
[08:51:42 ERROR]: ------------------------------
[08:51:42 ERROR]: Current Thread: Server thread
[08:51:42 ERROR]: PID: 20 | Suspended: false | Native: false | State: RUNNABLE
[08:51:42 ERROR]: Stack:
[08:51:42 ERROR]: app//net.minecraft.world.entity.Mob.serverAiStep(Mob.java:856)
[08:51:42 ERROR]: app//net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3156)
[08:51:42 ERROR]: app//net.minecraft.world.entity.Mob.aiStep(Mob.java:625)
[08:51:42 ERROR]: app//net.minecraft.world.entity.AgeableMob.aiStep(AgeableMob.java:154)
[08:51:42 ERROR]: app//net.minecraft.world.entity.animal.Animal.aiStep(Animal.java:59)
[08:51:42 ERROR]: app//net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:2882)
[08:51:42 ERROR]: app//net.minecraft.world.entity.Mob.tick(Mob.java:393)
[08:51:42 ERROR]: app//net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1114)
[08:51:42 ERROR]: app//net.minecraft.server.level.WorldServer$$Lambda$6579/0x0000000802152e40.accept(Unknown Source)
[08:51:42 ERROR]: app//net.minecraft.world.level.Level.guardEntityTick(Level.java:986)
[08:51:42 ERROR]: app//net.minecraft.server.level.ServerLevel.lambda$tick$7(ServerLevel.java:775)
[08:51:42 ERROR]: app//net.minecraft.server.level.WorldServer$$Lambda$6567/0x000000080213c290.accept(Unknown Source)
[08:51:42 ERROR]: app//net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:43)
[08:51:42 ERROR]: app//net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:756)
[08:51:42 ERROR]: app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1619)
[08:51:42 ERROR]: app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:479)
[08:51:42 ERROR]: app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1475)
[08:51:42 ERROR]: app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1274)
[08:51:42 ERROR]: app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[08:51:42 ERROR]: app//net.minecraft.server.MinecraftServer$$Lambda$3663/0x00000008013c7330.run(Unknown Source)
[08:51:42 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:831)
[08:51:42 ERROR]: ------------------------------
[08:51:42 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[08:51:42 ERROR]: ------------------------------
[08:51:42 WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[08:51:43 WARN]: [DiscordSRV] [JDA] Got disconnected from WebSocket (Code 1000). Appending to reconnect queue
[08:51:43 WARN]: Can't keep up! Is the server overloaded? Running 134840ms or 2696 ticks behind
[08:51:45 INFO]: [DiscordSRV] [JDA] Connected to WebSocket
[08:51:45 INFO]: [DiscordSRV] [JDA] Finished (Re)Loading!
[08:57:31 WARN]: Can't keep up! Is the server overloaded? Running 7219ms or 144 ticks behind
[08:57:50 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-279 (MC: 1.17.1) ---
[08:58:25 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[08:58:59 ERROR]: ------------------------------
[08:59:02 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[09:02:06 WARN]: [DiscordSRV] [JDA] Missed 2 heartbeats! Trying to reconnect...
[09:03:39 WARN]: io.netty.channel.unix.Errors$NativeIoException: writeAddress(..) failed: Connection reset by peer
[09:03:39 ERROR]: [DiscordSRV] [JDA] Encountered exception trying to execute request
java.lang.IllegalStateException: Could not acquire lock in a reasonable timeframe! (10 seconds)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.api.utils.MiscUtil.tryLock(MiscUtil.java:169)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.api.utils.MiscUtil.locked(MiscUtil.java:131)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter.getBucket(BotRateLimiter.java:315)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter.getRateLimit(BotRateLimiter.java:196)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:147)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:141)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.Requester.execute(Requester.java:124)
at DiscordSRV-Build-1.24.0.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)

09:04:00 ERROR: Current Thread: Server thread
09:04:00 ERROR: PID: 20 | Suspended: false | Native: false | State: RUNNABLE
09:04:00 ERROR: Stack:
09:04:00 ERROR: app//com.google.common.collect.RegularImmutableMap.get(RegularImmutableMap.java:166)
09:04:00 ERROR: app//com.google.common.collect.RegularImmutableMap.get(RegularImmutableMap.java:155)
09:04:00 ERROR: app//net.minecraft.world.level.GameRules.getRule(GameRules.java:121)
09:04:00 ERROR: app//net.minecraft.world.level.GameRules.getBoolean(GameRules.java:172)
09:04:00 ERROR: app//net.minecraft.server.level.ServerLevel.tickTime(ServerLevel.java:799)
09:04:00 ERROR: app//net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:716)
09:04:00 ERROR: app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1619)
09:04:00 ERROR: app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:479)
09:04:00 ERROR: app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1475)
09:04:00 ERROR: app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1274)
09:04:00 ERROR: app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
09:04:00 ERROR: app//net.minecraft.server.MinecraftServer$$Lambda$3663/0x00000008013c7330.run(Unknown Source)
09:04:00 ERROR: [email protected]/java.lang.Thread.run(Thread.java:831)
09:04:00 ERROR: ------------------------------
09:04:00 ERROR: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
09:04:00 ERROR: ------------------------------
[09:04:00 WARN]: [DiscordSRV] [JDA] Got disconnected from WebSocket (Code 1000). Appending to reconnect queue
[09:04:01 WARN]: Can't keep up! Is the server overloaded? Running 380303ms or 7606 ticks behind
[09:04:02 INFO]: [DiscordSRV] [JDA] Connected to WebSocket
[09:04:03 INFO]: [DiscordSRV] [JDA] Finished (Re)Loading!

Server software and version

paper 1.17.1

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.

Anything else

help me fix it pls

commented

That's caused by PvPManager submitting metrics on the main thread, not a DiscordSRV issue