concurrent_requests_limit 🔌 API

API Error: Too many concurrent requests (concurrency limit reached)

You have more requests in flight at once than the API allows for your key — even if your requests-per-minute rate is fine.

Seen on: REST API

Meaning

Many APIs limit concurrency separately from rate: e.g. “at most 10 simultaneous requests”. Long-running calls (exports, AI generations, uploads) hold a slot until they finish, so a burst of parallel jobs can hit the ceiling. It is usually returned as 429 with a message about concurrent or simultaneous requests; Shopify, Vimeo, AI APIs and many others do this.

Common causes

  • Unbounded Promise.all / thread pool sending everything at once
  • Several servers or workers sharing one API key
  • Slow requests holding slots longer than expected
  • Retries piling up on top of in-flight requests

⚡ Quick fix

  1. Cap parallelism with a queue or semaphore (e.g. 3–5 at a time)
  2. Retry with exponential backoff and jitter after the slot frees
  3. Spread workers across keys only if the provider allows it

Detailed fix by platform

Node.js

  1. javascript
    import pLimit from 'p-limit';
    const limit = pLimit(4);
    await Promise.all(items.map(i => limit(() => callApi(i))));

Python

  1. python
    sem = asyncio.Semaphore(4)
    async def call(i):
        async with sem:
            return await client.post(url, json=i)

How to diagnose

  1. In-flight — How many requests are open at peak?
  2. Duration — Which calls take longest?
  3. Sharing — How many processes use this key?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.