Skip to main content

Too Many Requests

Requests to the tunnel get a response with the 429 status. The response text depends on which limit was hit:

local_rate_limited
Too Many Requests

The response can also come with an empty body.

Causeโ€‹

There are three limits:

  • local_rate_limited โ€” the general Tuna limit: 100 requests per second per tunnel address on average, with short bursts of up to 700 requests. Each Tuna edge server counts the limit separately. The response has the Retry-After: 1 header. See Restrictions for details.
  • Too Many Requests โ€” the tunnel was started with the --rate-limit flag, and more requests per second arrived than it allows. The tuna client on the machine running the tunnel enforces this limit.
  • An empty 429 response โ€” the rate_limit action in the tunnel's traffic policy was triggered.

What to doโ€‹

  1. If the response is Too Many Requests or empty, raise the --rate-limit value or the rate_limit parameters in the traffic policy.
  2. If the response is local_rate_limited, reduce the request rate: for example, cache static files, batch small requests, and retry with a pause based on the Retry-After header. Tunnels aren't suitable for load testing.

If the tunnel isn't yours, wait a few seconds and retry the request.