ABUSE_REQUESTS shutdown means your application was making API calls to the Discord or Amino APIs at a rate the platform considers abusive — either exceeding the API provider’s own rate limits, or generating an unsustainably high volume of requests in a short period. Virtus Cloud monitors outbound API traffic and shuts down applications that could endanger shared network resources or cause your bot’s API access to be suspended. Fixing this error requires you to understand where the excessive requests are coming from and restructure your code to operate within safe limits.
When Does It Occur?
You’ll see the following message in your application logs when the platform enforces the request limit:Why Does It Occur?
This error arises when your application exceeds the permissible request rate to the Discord and/or Amino APIs. Root causes typically include:- Inefficient event handlers — responding to every message or event with one or more API calls, without any debouncing or deduplication.
- Missing caching — fetching the same guild, channel, user, or role data repeatedly instead of caching it after the first fetch.
- Tight polling loops — periodically checking an API endpoint in a loop without any meaningful delay between requests.
- Rapid user growth — a legitimate increase in user activity causing proportionally more API calls than your application was originally designed to handle.
How to Fix It
Monitor and Optimize Your Code
Identify the source of excessive requests
Add logging around every API call in your application. Look for sections of code that call the Discord or Amino API inside event handlers that fire frequently — such as
messageCreate, interactionCreate, or guildMemberUpdate. Log the call count per minute to quantify the problem.Eliminate unnecessary API calls
Review every API call and ask whether it’s essential. For example:
- If you’re fetching a user’s roles on every message, cache them instead.
- If you’re calling
channel.fetch()to get a channel object that the event already provides, use the event’s built-in data instead. - If you’re sending status updates to multiple channels, consider whether a single channel would suffice.
Implement Caching
Caching is the single most effective way to reduce API request volume. Store data that doesn’t change frequently in memory and reuse it for subsequent requests:Use discord.js built-in cache
Use discord.js built-in cache
The discord.js
Client automatically caches guilds, channels, roles, and members in its internal Collection objects. Access cached data through client.guilds.cache.get(id), guild.channels.cache.get(id), etc., rather than calling .fetch() methods, which always make a fresh API request.Implement a custom cache with TTL
Implement a custom cache with TTL
For data that changes occasionally, implement a simple time-to-live (TTL) cache in memory. Store the result of an API call alongside a timestamp, and only refresh it after the TTL expires:
Keep Your Libraries Updated
Outdated library versions sometimes include inefficient API usage patterns or bugs that generate unnecessary requests. Update to the latest stable release:Request a Higher Limit
If your application genuinely needs to make more API requests than the current limit allows — for example, because it serves a very large and active community — contact the Discord or Amino support teams directly to request an increased rate limit for your bot. Provide context about your bot’s purpose, its user base, and the steps you’ve already taken to optimize request volume.Test and Verify
After making your optimizations, thoroughly test your application under simulated load before redeploying to production. Verify that the request volume stays within acceptable bounds, then restart your application from the dashboard and monitor the logs for any recurrence of theABUSE_REQUESTS shutdown.
If you continue to experience
ABUSE_REQUESTS shutdowns after optimizing your code, contact the Virtus Cloud support team.