Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 429 calling https://discord.com #9862

Open
sentry-io bot opened this issue Dec 31, 2023 · 2 comments
Open

Error: 429 calling https://discord.com #9862

sentry-io bot opened this issue Dec 31, 2023 · 2 comments
Assignees
Labels
sentry Bugs found using Sentry service-badge Accepted and actionable changes, features, and bugs

Comments

@sentry-io
Copy link

sentry-io bot commented Dec 31, 2023

Sentry Issue: SHIELDS-CF

Error: 429 calling https://discord.com
  File "/usr/src/app/core/base-service/check-error-response.js", line 31, in <anonymous>
    log.error(new Error(`${res.statusCode} calling ${res.requestUrl.origin}`))
  File "/usr/src/app/core/base-service/base.js", line 299, in Discord._request
    return checkErrorResponse(httpErrors, logErrors)({ buffer, res })
  File "/usr/src/app/core/base-service/base-json.js", line 60, in Discord._requestJson
    const { buffer } = await this._request({
  File "/usr/src/app/services/discord/discord.service.js", line 81, in Discord.handle
    const data = await this.fetch({ serverId })
  File "/usr/src/app/core/base-service/base.js", line 473, in Discord.invoke
    serviceData = await serviceInstance.handle(
...
(2 additional frame(s) were not displayed)
@sentry-io sentry-io bot added sentry Bugs found using Sentry service-badge Accepted and actionable changes, features, and bugs labels Dec 31, 2023
@chris48s
Copy link
Member

chris48s commented Dec 31, 2023

Quick summary:

  • Discord is one of our most popular services. In the last 24 hours, we've served over 1 million discord badges from the origin! (i.e: excluding badges cached at the CDN)
  • This is partly due to the popularity of the service, but also our discord badge shows the number of users online now so we don't cache it for long because the data benefits more from being fresh than a lot of our badges.
  • Although we serve the majority of those badges successfully, we also see a lot of 429 Too Many Requests responses from discord's API. In the last 24 hours, we've logged over 1,100 of these. That is a low proportion of the total api traffic, but also very much a non-zero number of failures.
  • In cache some badges for longer #9785 I bumped the max-age on the badges up from 1 minute to 5 minutes, but we are still hitting rate limits.

In #9098 (comment) @PyvesB noted that

We do have a point of contact and a special token for Discord

@PyvesB - do you still have contact details for someone there? Would you be up for following this one up?

@PyvesB PyvesB self-assigned this Jan 1, 2024
@PyvesB
Copy link
Member

PyvesB commented Jan 1, 2024

Our previous rate limit was set to 500/60s if I'm not mistaken, I've asked for it to be raised to 2000/60s. One of the two previous points of contact no longer seems to work at Discord (Zack), but I've contacted the second one (Mason). Will keep you posted when I hear back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sentry Bugs found using Sentry service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

No branches or pull requests

2 participants