# 429 Too Many Requests: request rate limit hit

> Turso throttles request rate with 429: back off and retry and it clears, while billing quota exhaustion surfaces as the BLOCKED error code instead.

Source: https://sqlly.app/errors/libsql/rate-limited-429
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error: `429 Too Many Requests`
- Category: Remote server and Hrana errors

Error message:

```text
Server returned HTTP status 429 Too Many Requests
```

## What it means

Turso throttles bursts of requests with 429. It is a short-term signal: back off and retry, and it clears. Quota exhaustion is different: the docs say exceeding the monthly row-read, row-write, or storage quota fails with the `BLOCKED` error code, and Turso's response-code reference does not list 429 at all. So a 429 points at request rate, not at billing.

## Common causes

- More concurrent requests than the plan allows, often from a connection pool sized for a different database.
- A retry loop with no backoff turning one slow request into a storm.
- Monthly quota exhaustion, but that surfaces as `BLOCKED`, not 429, so check usage before assuming quota.
- A batch job and live traffic sharing one database with no limit on either side.

## How to fix it

1. Retry the request with exponential backoff and honor any Retry-After header:

   ```sql
   // retry on 429 with backoff
   for (let i = 0; i < 5; i++) {
     try { return await db.execute(sql); }
     catch (e) {
       if (!String(e).includes('429') || i === 4) throw e;
       await new Promise(r => setTimeout(r, 500 * 2 ** i));
     }
   }
   ```
2. Cap the connection pool so live traffic cannot starve the limit:

   ```sql
   // @libsql/client: reuse one client, do not create one per request
   const db = createClient({ url: process.env.LIBSQL_URL, authToken: process.env.LIBSQL_TOKEN });
   ```
3. Check current usage against the plan's limits:

   ```sql
   turso plan show
   turso db inspect mydb
   ```
4. Collapse many small statements into one batch to cut request count:

   ```sql
   await db.batch([
     { sql: "INSERT INTO t (a) VALUES (?)", args: [1] },
     { sql: "INSERT INTO t (a) VALUES (?)", args: [2] }
   ]);
   ```

## Reproduce it safely

```sql
Reproducing 429 honestly needs a real database and enough traffic to trip the limit, which I would not run against a production database. The shape is easy to demonstrate though: fire a few hundred parallel requests from a loop at one test database with @libsql/client until the server answers 429. Local `turso dev` has no rate limiter, so it cannot reproduce it.
```

## How SQLly helps

SQLly issues one request per statement you run, so a burst of 429s in the desktop client usually means an automation elsewhere is hammering the same database; the error text and timing in the result pane make the pattern obvious.

## Questions

### Why do I get BLOCKED instead of 429 on Turso?

Quota exhaustion (monthly row reads, row writes, or storage) fails with the `BLOCKED` error code per Turso's usage docs. 429 is the burst request-rate signal. Check `turso plan show` to see which one you hit.

### How do I check my current Turso usage and limits?

`turso plan show` prints the current plan usage and limits, and `turso db inspect <db>` shows a database's rows read, rows written, and space used. `turso org billing` opens the billing portal.

### Does retrying fix a 429 from Turso?

Only when it is request rate: back off exponentially, honor `Retry-After` if present, and cap concurrent clients. If the real problem is an exhausted quota the error is `BLOCKED`, and retries change nothing until the reset or an upgrade.

## Related errors

- [`too many connections`](https://sqlly.app/errors/libsql/too-many-connections): Too many connections to one database
- [`SQLITE_BUSY`](https://sqlly.app/errors/libsql/busy): SQLITE_BUSY: the database is busy
- [`401 Unauthorized`](https://sqlly.app/errors/libsql/unauthorized-401): 401 Unauthorized: bad or missing auth token

The code and message text are from the [libSQL / Turso documentation](https://docs.turso.tech/).
