Closed JellyBrick closed 4 years ago
What is the shard status? Do you have any exceptions, warnings, or error logs? Can you provide a thread dump?
[WARN ] [WebSocketClient]: Hit the WebSocket RateLimit! This can be caused by too many presence or voice status updates (connect/disconnect/mute/deaf). Regular: 0 Voice: 19 Chunking: 0
[WARN ] [WebSocketClient]: Missed 2 heartbeats! Trying to reconnect...
Do you have any priviledged intents enabled/disabled? I received a similar issue, but with "Chunking" and a fix was to change the ChunkingFilter to NONE and to also disable The Intents for PRESENCE, VOICE_STATE (I assume you need it?) and CLIENT_STATUS.
Not sure if disabling some of them would help.
I need the following:
jstack -l <pid>
Privileged intents are disabled. and
CONNECTED
.[WARN ] [daemon-pool-gateway-4-thread-2] [WebSocketClient]: Hit the WebSocket RateLimit! This can be caused by too many presence or voice status updates (connect/disconnect/mute/deaf). Regular: 0 Voice: 19 Chunking: 0
[WARN ] [daemon-pool-gateway-4-thread-3] [WebSocketClient]: Missed 2 heartbeats! Trying to reconnect...
priority:5 - threadId:daemon-pool-gateway-4-thread-2 - state:WAITING
stackTrace:
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
- parking to wait for <0x0000000481611850> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.6/ScheduledThreadPoolExecutor.java:1177)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.6/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.6/ThreadPoolExecutor.java:1054)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)
priority:5 - threadId:daemon-pool-gateway-4-thread-3 - state:WAITING
stackTrace:
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
- parking to wait for <0x0000000481611850> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.6/ScheduledThreadPoolExecutor.java:1177)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.6/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.6/ThreadPoolExecutor.java:1054)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)
Thats only 2 daemon threads, this isn't a thread dump. Please provide a complete thread dump. You can post it on https://gist.github.com and link it here.
It looks like you somehow killed the WriteThread for shard 4.
Update to 4.1.1_148 and check if the behavior returns.
Thanks! It seems like the problem is solved!
General Troubleshooting
Bug Report
Some shard's connection is broken, but can't reconnect until the program exit. (with this warnings)
It appears to be related to this PR (#1282).
Expected Behavior
The connection will be auto recovering soon.
Code Example or Reproduction Steps
N/A
Code for JDABuilder or DefaultShardManagerBuilder Used
Exception or Error
N/A