Client disconnects after ready, takes 1-2 minutes to reconnect every time

The full debug log is attached below After restarting my Bot I get a ready, then all shards seemingly disconnect and after 1-2 minutes reconnect Is there a simple answer to this behavior, like "it's normal on some clients" or "definitely caused by x"? Just wanna see if there's a known answer before I start taking my code apart and exhausting my daily logins. Comprehensive order of events as outlined by the debug log: - Ready - Shards send the first heartbeat - Shards Destroyed - "Connection status during destroy" - Connecting to WS - Waiting for Hello - Reconnect - Preparing Heartbeat - Identifying - Waiting for ready - Ready - Heartbeats start Node ver: 21.2.0 Djs Ver: 14.14.1
2 Replies
d.js toolkit
d.js toolkit10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Lolo
LoloOP10mo ago
| => Bot: Ayako#6768 / 650691698409734151
| => Cluster: 1
| => Shards: 1, 2, 3
| Login at 2/27/2024, 11:39:56 AM
0 [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 0] Heartbeat acknowledged, latency of 1868ms.
142537 [WS => Shard 2] First heartbeat sent, starting to beat every 41250ms
144573 [WS => Shard 0] Destroying shard
Reason: Got disconnected by Discord
Code: 1000
Recover: Reconnect
144573 [WS => Shard 0] Connection status during destroy
Needs closing: false
Ready state: 3
144573 [WS => Shard 1] Destroying shard
Reason: Got disconnected by Discord
Code: 1000
Recover: Reconnect
144573 [WS => Shard 1] Connection status during destroy
Needs closing: false
Ready state: 3
144574 [WS => Shard 2] Destroying shard
Reason: Got disconnected by Discord
Code: 1000
Recover: Reconnect
144574 [WS => Shard 2] Connection status during destroy
Needs closing: false
Ready state: 3
145827 [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json
145827 [WS => Shard 0] Waiting for event hello for 60000ms
145830 [WS => Shard 1] Connecting to wss://gateway.discord.gg?v=10&encoding=json
145830 [WS => Shard 1] Waiting for event hello for 60000ms
145832 [WS => Shard 2] Connecting to wss://gateway.discord.gg?v=10&encoding=json
145832 [WS => Shard 2] Waiting for event hello for 60000ms
[Shard 1] Reconnecting...
[Shard 2] Reconnecting...
[Shard 3] Reconnecting...
148389 [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.4734907018343779; waiting 19531ms
148389 [WS => Shard 0] Waiting for identify throttle
148392 [WS => Shard 1] Preparing first heartbeat of the connection with a jitter of 0.7751128394603057; waiting 31973ms
148392 [WS => Shard 1] Waiting for identify throttle
148394 [WS => Shard 2] Preparing first heartbeat of the connection with a jitter of 0.543816949288016; waiting 22432ms
148394 [WS => Shard 2] Waiting for identify throttle
148429 [WS => Shard 0] Identifying
shard id: 0
shard count: 3
intents: 3260159
compression: none
148429 [WS => Shard 0] Waiting for event ready for 15000ms
154407 [WS => Shard 0] Shard received all its guilds. Marking as fully ready.
154644 [WS => Shard 1] Identifying
shard id: 1
shard count: 3
intents: 3260159
compression: none
154644 [WS => Shard 1] Waiting for event ready for 15000ms
[Shard 1] Ready Unavailable Guilds: 0
159421 [WS => Shard 1] Shard received all its guilds. Marking as fully ready.
[Shard 2] Ready Unavailable Guilds: 0
160670 [WS => Shard 2] Identifying
shard id: 2
shard count: 3
intents: 3260159
compression: none
160670 [WS => Shard 2] Waiting for event ready for 15000ms
165721 [WS => Shard 2] Shard received all its guilds. Marking as fully ready.
[Shard 3] Ready Unavailable Guilds: 0
167929 [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 0] Heartbeat acknowledged, latency of 109ms.
170834 [WS => Shard 2] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 2] Heartbeat acknowledged, latency of 109ms.
180414 [WS => Shard 1] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 1] Heartbeat acknowledged, latency of 159ms.
[WS => Shard 0] Heartbeat acknowledged, latency of 124ms.
[WS => Shard 2] Heartbeat acknowledged, latency of 110ms.
| => Bot: Ayako#6768 / 650691698409734151
| => Cluster: 1
| => Shards: 1, 2, 3
| Login at 2/27/2024, 11:39:56 AM
0 [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 0] Heartbeat acknowledged, latency of 1868ms.
142537 [WS => Shard 2] First heartbeat sent, starting to beat every 41250ms
144573 [WS => Shard 0] Destroying shard
Reason: Got disconnected by Discord
Code: 1000
Recover: Reconnect
144573 [WS => Shard 0] Connection status during destroy
Needs closing: false
Ready state: 3
144573 [WS => Shard 1] Destroying shard
Reason: Got disconnected by Discord
Code: 1000
Recover: Reconnect
144573 [WS => Shard 1] Connection status during destroy
Needs closing: false
Ready state: 3
144574 [WS => Shard 2] Destroying shard
Reason: Got disconnected by Discord
Code: 1000
Recover: Reconnect
144574 [WS => Shard 2] Connection status during destroy
Needs closing: false
Ready state: 3
145827 [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json
145827 [WS => Shard 0] Waiting for event hello for 60000ms
145830 [WS => Shard 1] Connecting to wss://gateway.discord.gg?v=10&encoding=json
145830 [WS => Shard 1] Waiting for event hello for 60000ms
145832 [WS => Shard 2] Connecting to wss://gateway.discord.gg?v=10&encoding=json
145832 [WS => Shard 2] Waiting for event hello for 60000ms
[Shard 1] Reconnecting...
[Shard 2] Reconnecting...
[Shard 3] Reconnecting...
148389 [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.4734907018343779; waiting 19531ms
148389 [WS => Shard 0] Waiting for identify throttle
148392 [WS => Shard 1] Preparing first heartbeat of the connection with a jitter of 0.7751128394603057; waiting 31973ms
148392 [WS => Shard 1] Waiting for identify throttle
148394 [WS => Shard 2] Preparing first heartbeat of the connection with a jitter of 0.543816949288016; waiting 22432ms
148394 [WS => Shard 2] Waiting for identify throttle
148429 [WS => Shard 0] Identifying
shard id: 0
shard count: 3
intents: 3260159
compression: none
148429 [WS => Shard 0] Waiting for event ready for 15000ms
154407 [WS => Shard 0] Shard received all its guilds. Marking as fully ready.
154644 [WS => Shard 1] Identifying
shard id: 1
shard count: 3
intents: 3260159
compression: none
154644 [WS => Shard 1] Waiting for event ready for 15000ms
[Shard 1] Ready Unavailable Guilds: 0
159421 [WS => Shard 1] Shard received all its guilds. Marking as fully ready.
[Shard 2] Ready Unavailable Guilds: 0
160670 [WS => Shard 2] Identifying
shard id: 2
shard count: 3
intents: 3260159
compression: none
160670 [WS => Shard 2] Waiting for event ready for 15000ms
165721 [WS => Shard 2] Shard received all its guilds. Marking as fully ready.
[Shard 3] Ready Unavailable Guilds: 0
167929 [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 0] Heartbeat acknowledged, latency of 109ms.
170834 [WS => Shard 2] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 2] Heartbeat acknowledged, latency of 109ms.
180414 [WS => Shard 1] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 1] Heartbeat acknowledged, latency of 159ms.
[WS => Shard 0] Heartbeat acknowledged, latency of 124ms.
[WS => Shard 2] Heartbeat acknowledged, latency of 110ms.
the numbers are ms since startup starting at 0 [WS => Shard 0] First heartbeat sent, Alr so no easy solution, thank you. I'll start taking apart my ready event
Want results from more Discord servers?
Add your server