discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.9k stars 1.25k forks source link

Unexpected server response: 520 #7016

Closed pkdev08 closed 1 month ago

pkdev08 commented 1 month ago

Description

Recently, starting in may I have been getting Unexpected server response: 520 shard response almost once or twice a day. It happens on my production server as well as locally sometimes on my development bot. This never happened prior to May 2024. Others have also been reporting these recently. I'm currently using discord.js 14.15.3 but they said this is not an issue from their library. Anything that can be done about this?

Steps to Reproduce

Start a boot and wait for the 520 response to come.

Expected Behavior

Wouldn't get the 520's

Current Behavior

Getting 520's several times a day.

Screenshots/Videos

No response

Client and System Information

Debian LTS node Discord.js 14.15.3

hackermondev commented 1 month ago

They mentioned in their patch notes around April that they made some infrastructure changes (https://discord.com/blog/discord-patch-notes-april-2024):

We made some infrastructure improvements, including moving to GCE C3 instances and removing an nginx layer, which yielded a ~25% reduction in p90+ API latency.

This is probably related. Regardless, 5xx errors should just be retried.