#UND_ERR_CONNECT_TIMEOUT

13 messages · Page 1 of 1 (latest)

spark raptor

I was trying to figure out the command to ping discord servers to fix my UND_ERR_CONNECT_TIMEOUT error.

pine mesaBOT
  • 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!
  • Marked as resolved by OP
tardy crown

Pinging the server doesn’t fix anything. It would help you determine the cause though

dreamy orioleBOT

Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.

client
    .on("debug", console.log)
    .on("warn", console.log)
  • Note: if you initialize your Client as bot or other identifiers you need to use these instead of client
  • If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin
tardy crown

This might help too

wss://gateway.discord.gg/?v=10&encoding=json would be the URL you‘d want to try to connect to to check

spark raptor
tardy crown Pinging the server doesn’t fix anything. It would help you determine the cause t...

Told me this:

[WS => Manager] Manager was destroyed:
    at WebSocketManager.destroy (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:327:30)
    at ExtendedClient.destroy (/home/container/node_modules/discord.js/src/client/Client.js:253:19)
    at ExtendedClient.login (/home/container/node_modules/discord.js/src/client/Client.js:231:18)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
/home/container/node_modules/undici/lib/core/connect.js:186
  util.destroy(socket, new ConnectTimeoutError())
                       ^
ConnectTimeoutError: Connect Timeout Error
    at onConnectTimeout (/home/container/node_modules/undici/lib/core/connect.js:186:24)
    at /home/container/node_modules/undici/lib/core/connect.js:133:46
    at Immediate._onImmediate (/home/container/node_modules/undici/lib/core/connect.js:174:9)
tardy crown

That looks like you indeed got cloudflare banned. And if it‘s a dedicated server like you said it was that means that your bot code caused too many 401, 403 or 429 responses in a short amount of time

spark raptor

So how would I fix it

tardy crown

By not causing those errors…

dreamy orioleBOT

discord Rate Limits - Invalid Request Limit aka CloudFlare bans
read more

neat token

How did you manage to cause 10k invalid calls within 10 minutes?

IP addresses that make too many invalid HTTP requests are automatically and temporarily restricted from accessing the Discord API. Currently, this limit is 10,000 per 10 minutes. An invalid request is one that results in 401, 403, or 429 statuses.

tardy crown

One way is retrying a request on error in a loop