TICKET HX-1156

Hit 429 errors well below the documented rate limit

Status: Resolved Category: API Priority: P2 Customer: Priya Singh (DataMesh AI) Agent: Marcus Webb
Priya Singh Customer 2024-03-20 11:02 UTC

I'm on the Pro plan and your docs say the rate limit is 1000 requests per minute, but my client is getting 429s after only about 400 requests. Something is wrong on your side.

Marcus Webb Helix Support 2024-03-20 11:18 UTC

Hi Priya — let me look at your traffic. Two things to check first: (1) are you using a single API key or multiple? Rate limits are per-workspace, so all keys share the budget. (2) What's the burst pattern — is the client sending 400 in a few seconds, or distributed evenly across the minute?

Priya Singh Customer 2024-03-20 11:25 UTC

Single key. The client batches and sends ~400 requests in about 3 seconds, then waits, then does it again.

Marcus Webb Helix Support 2024-03-20 11:34 UTC

That's the issue. The 1000/min limit is enforced as a token bucket — 1000 tokens that refill at ~17/second. A 400-request burst in 3 seconds drains the bucket faster than it refills, so once the bucket hits empty you get 429s even though you're under the per-minute number.

The fix is to spread requests more evenly. Two options:

  • Add a small delay between batches (a 50ms sleep between requests would smooth the burst).
  • Use the Retry-After header on 429 responses to back off automatically.

You can monitor your bucket state via the X-RateLimit-Remaining header on every response.

Priya Singh Customer 2024-03-20 11:42 UTC

Ah, that's documented? I missed it. Will adjust the client. Thanks.

Marcus Webb Helix Support 2024-03-20 11:47 UTC

It's in our rate limits doc but I agree the token bucket part is buried — I'll flag this internally to surface it more clearly. Anything else?

Priya Singh Customer 2024-03-20 11:51 UTC

All good. Fixed it on my end and the bursts are smoothed out now. Closing.

RESOLUTION

Customer was hitting 429 errors below their plan's documented rate limit because the limit is a token bucket, not a per-minute counter. A burst of 400 requests in 3 seconds drained the bucket faster than it refilled. Customer added per-request delays and used X-RateLimit-Remaining and Retry-After headers to smooth traffic. Resolved.