An HTTP 429 means the request was rate limited. Use the retry timing returned by Discord and the queueing provided by a maintained client library. Restarting the bot or adding parallel workers is not a reliable way to clear a limit.
Classify the response first
Discord documents per-route and global limits and supplies rate-limit information in response headers. On a 429, respect Retry-After or the retry_after response field. Do not bake one assumed request allowance into every endpoint.
| Response | Next action |
|---|---|
| 401 authentication failure | Check the credential and stop repeated invalid requests |
| 403 permission failure | Check access to the resource |
| 429 rate limit | Wait according to the response and library queue |
| Timeout or server error | Use bounded retries appropriate to the operation |
Find the producer of duplicate work
- Group redacted failures by operation, route and time interval.
- Check whether two production instances are handling the same event.
- Check scheduled jobs for overlap and handlers for duplicate registration.
- Cache data only where it is safe and refresh it intentionally.
- Combine repeated status updates and bound the amount of queued work.
For example, a progress message rarely needs an edit for every processed item. Report meaningful milestones instead. For irreversible application actions, store a job identifier so retrying a request does not also repeat your database change or charge an account twice.
Check recovery, not just the absence of errors
In staging, simulate a throttled dependency or mock a retry response. Verify that the queue pauses, remains bounded and resumes without duplicating results. Do not deliberately flood Discord to test its enforcement. Monitor the oldest queued job as well as queue length so slow recovery becomes visible.
Review interaction acknowledgement when queued work affects commands. Use a staging deployment before changing retry behavior.
Sources and references
Hosting documentation. Publication and update dates reflect this edition.
Related articles
- Fixing “The Application Did Not Respond” on Discord CommandsTrace command delivery, acknowledgement and follow-up work instead of blaming server ping alone.2 min read
- Discord Bot Intents vs Permissions: Why Events or Actions FailDistinguish missing event data from denied channel actions and role hierarchy restrictions.2 min read
- Updating a Discord Bot with a Separate Test DeploymentTest dependencies, commands and database changes without running competing copies of your production bot.2 min read
