DashScope Throttling.RateQuota 429: Minute, Per-Second or Burst

Blog / Troubleshooting

DashScope Throttling.RateQuota 429: Minute, Per-Second or Burst

When Alibaba Cloud Model Studio (known in its API as DashScope) returns HTTP 429 with the error code Throttling.RateQuota, your request rate has exceeded the quota your account has for that model. The service is not down, and it is not a balance problem. The same error code usually hides three different triggers: the per-minute request quota (RPM) is used up, requests bunch up inside a single second, or traffic jumped from a low level too quickly. Each one has a different error-time pattern and a different fix. This article goes in the order "read the logs, identify the type, then change the client."

How is Throttling.RateQuota different from other 429s?

Model Studio returns more than one kind of 429, and some error codes look like rate limiting but are not. Before you debug, log the full error code from the response body, not just the status code. The native API (/api/v1/services/...) returns an error body roughly like this (an example; the actual message text may differ):

{
  "code": "Throttling.RateQuota",
  "message": "Requests rate limit exceeded, please try again later.",
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

If you use the OpenAI-compatible mode (https://dashscope.aliyuncs.com/compatible-mode/v1), the error is wrapped in an error object, and the field names are not identical to the native API. The safe approach is to log code, type, message and request_id. When you open a ticket with Alibaba Cloud, request_id is the most useful item.

Error code (meaning per the official error-code docs)Rough meaningFirst reaction
Throttling.RateQuotaRequest rate exceeded (counted in requests)Slow down, queue, limit concurrency
Throttling.AllocationQuotaToken usage exceeded (counted in tokens)Shorten context, lower max_tokens, split batches
Throttling and other throttling codesPlatform-side general throttling or resource pressureBack off and retry; check the status page
Arrearage and similar (not a 429)Overdue payment or account quota issueCheck billing in the console; retrying will not help

For general 429 handling (RPM, TPM, Retry-After), see What to do when an API returns 429 Too Many Requests. For a table of status codes across providers, see the LLM API error code cheatsheet. This article covers only this one Model Studio error code.

How does Model Studio calculate rate limits?

According to the official Model Studio rate-limit documentation, quotas are calculated per "root account + model." All API keys, all RAM sub-accounts (Alibaba Cloud's IAM users) and all workloads under the same root account share one quota. This is easy to overlook. If a test script, a production service and a colleague's local debugging all use the same root account, they are drawing from the same bucket.

Quotas are stated as RPM (requests per minute) and TPM (tokens per minute). The numbers differ by model and can change, so check the console and the current official docs; this article does not list any. The official docs also state two things that go against intuition:

  1. Per-minute quotas are spread down to the second. The published figure is a per-minute cap, but the platform also checks the rate over shorter windows. Even if the minute total is under the limit, requests clustered into a single second can still be rejected.
  2. Traffic that grows too fast can also be throttled. Going from very low volume to near the cap in an instant can produce 429s even when the absolute number is within the limit.

So when you ask "I only used half my quota this minute, why was I throttled?", start with these two points.

How do you tell which type it is from the error timing?

The most effective method is to sort recent requests by send time, mark which succeeded and which got 429, and look at the distribution. Here are the typical signatures of the three cases:

TriggerError time patternWhat else you seeKey check
Minute quota used upFirst part of each minute is fine, failures cluster in the later part, recovery at the start of the next minuteRequests per minute at or above RPMCount requests per calendar minute; failures cluster "after the quota runs out"
Per-second rate exceededFailures scattered across the minute, each right after a small cluster of simultaneous requestsMinute total well below RPM; the concurrency pool releases many requests at onceCount per second; the failing second has far more requests than average
Burst growthMore failures in the first ten-odd seconds to a minute or two after a batch or scheduled job starts, then steadyVery low call volume before the startFailures concentrate in the ramp-up phase and disappear at steady state

If none of the three fits, for example 429s appear together with 5xx errors and timeouts while your call volume has not changed, consider a platform-side problem. See the section "How do you confirm Model Studio itself isn't having trouble?" below.

A log-analysis script you can use directly

Assume each log line is ISO-timestamp status-code error-code, for example 2026-10-31T10:21:03.412+08:00 429 Throttling.RateQuota. The script below aggregates by second and by minute (fromisoformat needs Python 3.11 or later to parse this format with milliseconds and a time zone):

import sys
from collections import Counter
from datetime import datetime

per_sec, per_min, err_sec, err_min = Counter(), Counter(), Counter(), Counter()

for line in open(sys.argv[1], encoding="utf-8"):
    parts = line.split()
    if len(parts) < 2:
        continue
    ts = datetime.fromisoformat(parts[0])
    sec = ts.strftime("%H:%M:%S")
    minute = ts.strftime("%H:%M")
    per_sec[sec] += 1
    per_min[minute] += 1
    if parts[1] == "429":
        err_sec[sec] += 1
        err_min[minute] += 1

print("== Per minute: total / 429 ==")
for m in sorted(per_min):
    print(m, per_min[m], err_min[m])

print("== Seconds with 429s: total in that second / 429 ==")
for s in sorted(err_sec):
    print(s, per_sec[s], err_sec[s])

When reading the output, ask three questions. Is the total for the failing minutes close to RPM? Does the failing second have several times more requests than the average second? Do failures appear only while the job is starting up? These map to the three rows of the table above.

How do you fix each of the three cases?

Minute quota used up: rate-limit on the client instead of retrying blindly

When the quota is really insufficient, retries only make the next minute run out sooner. The client should send requests at a rate below RPM. A token bucket is the simplest implementation. Start with a rate of 80 to 90 percent of RPM (a rule of thumb, not an official recommendation) to leave headroom for other callers on the same account:

import asyncio, time

class TokenBucket:
    def __init__(self, rate_per_sec: float, capacity: int):
        self.rate = rate_per_sec
        self.capacity = capacity
        self.tokens = capacity
        self.updated = time.monotonic()
        self.lock = asyncio.Lock()

    async def acquire(self):
        while True:
            async with self.lock:
                now = time.monotonic()
                self.tokens = min(self.capacity,
                                  self.tokens + (now - self.updated) * self.rate)
                self.updated = now
                if self.tokens >= 1:
                    self.tokens -= 1
                    return
                wait = (1 - self.tokens) / self.rate
            await asyncio.sleep(wait)

# Example: if the console shows RPM = R, then rate = R * 0.85 / 60

Do not make capacity (bucket size) large. The capacity is the instantaneous burst you allow, and setting it to a few dozen leads directly to the second problem.

If you are running against the cap for long stretches, reduce the number of requests (merge short requests, cache repeated questions) or apply for a quota increase through the official process.

Per-second rate exceeded: limit concurrency and spread requests out

The root cause here is usually asyncio.gather releasing a whole batch at once, or a very large thread pool. Add a concurrency semaphore on top of the token bucket:

sem = asyncio.Semaphore(8)        # cap on in-flight requests; adjust to your case
bucket = TokenBucket(rate_per_sec=5, capacity=2)   # example values

async def call(client, payload):
    async with sem:
        await bucket.acquire()
        return await client.post("/chat/completions", json=payload)

The semaphore limits how many requests are in flight at the same time, and the token bucket limits how many are sent per second. Together they spread requests evenly across each second instead of letting them bunch up.

Burst growth: ramp up slowly at startup

Batch jobs, early-morning scheduled jobs and the traffic replay after a service cold start all tend to hit the growth-rate limit. Add a rate that grows over time to the token bucket:

def ramp_rate(target: float, started: float, ramp_seconds: float = 60) -> float:
    elapsed = time.monotonic() - started
    return target * min(1.0, 0.2 + 0.8 * elapsed / ramp_seconds)

# Before each acquire: bucket.rate = ramp_rate(target_rate, job_started)

This starts at 20% of the target rate and rises linearly to 100% over a minute. The ramp duration is an example value; tune it to your own error distribution. If failures cluster in the first 30 seconds after startup, set the ramp longer than 30 seconds.

Retry policy: needed in all three cases, but with a cap

After receiving Throttling.RateQuota you can retry, but use exponential backoff with random jitter and cap the total number of retries. If the response includes a Retry-After header, wait for that first. Without jitter, all concurrent coroutines retry at the same instant, which creates another per-second burst. For a full implementation, see How to write LLM API retries: exponential backoff with jitter.

For token-limit errors such as Throttling.AllocationQuota, retrying makes little sense. Shorten the input or lower max_tokens instead.

What about server-side queueing?

Some platforms offer a request parameter or header that makes the server queue a request instead of rejecting it immediately. Whether Model Studio offers such an option for your model and access method, what the parameter is called, and how much wait time it adds are all things to confirm in the current official rate-limit documentation. Even where it exists, it only smooths short bursts and cannot replace client-side rate limiting: queue time counts against your request timeout, and an SDK with a short timeout will turn queueing into timeout errors.

How do you confirm Model Studio itself isn't having trouble?

If you still see many 429s after adding client-side rate limiting, or the 429s appear together with 5xx errors and timeouts, look at the API endpoint itself. Go in this order:

  1. Open the cdnping Alibaba Cloud Model Studio API status page and check recent probe latency and availability. It probes dashscope.aliyuncs.com from the Cloudflare edge every 5 minutes.
  2. Open Is Qwen down? and see whether other users reported "rate limited" or "unreachable" at the same time.
  3. Run the online speed test to measure your own first-connection and round-trip time to Model Studio, which rules out a local network problem.
  4. Check the official updates tracker for recent changes to the Model Studio changelog and pricing page, such as models being retired or billing changes, and compare them against whether the quotas in your console have changed.

For reference, in a cdnping edge probe snapshot from October 17, 2026 (probe location: Cloudflare Denver, DEN; collection had just begun and the window was short), the round-trip median for dashscope.aliyuncs.com was 615 ms and P95 was 1152 ms, with every probe in the window succeeding. This data comes from an overseas edge node. It shows whether the API endpoint is reachable and roughly how fast it responds, not the latency you would see calling from a server in mainland China, and it cannot tell you whether your account is being throttled. Rate limits are calculated per account and model, so the status page can only rule out one possibility: an overall endpoint outage.

Troubleshooting checklist

When you hit Throttling.RateQuota, go through these in order:

  • Logs record the full error code and request_id, and you have confirmed it is Throttling.RateQuota rather than a token-type or billing-type error
  • You know which other services, scripts and colleagues under the same root account call the same model
  • You have looked up the RPM and TPM quotas for the model in the console
  • You have used the script to count requests and 429s by minute and by second, and placed the problem in one of the three types
  • Minute quota used up: add a token bucket with a rate of 80 to 90 percent of RPM
  • Per-second overrun: add a concurrency semaphore and shrink the bucket capacity
  • Burst growth: add a ramp-up to batch jobs and cold starts
  • Retries use exponential backoff with jitter, have a cap, and respect Retry-After
  • If you still see many 429s after all of the above: check /en/status/dashscope and /en/down/qwen, and open a ticket with the request_id if needed

How do you keep watching for it in production?

Rate limiting can come back whenever your volume grows or a new service is added under the same account. Make the 429 ratio its own alert metric, separate from 5xx errors and timeouts. For how to set thresholds, see How to set LLM API alert thresholds. If you use several Chinese model APIs at once, compare with Telling apart the different kinds of Kimi API 429. Each platform names its rate-limit codes differently, but the method of "read the error code first, then the time distribution" works everywhere.

Related articles

Keep reading