Skip to content

Limits ​

These are the limits a request or a plan can hit. All SQL surfaces (HTTP, WebSocket, Postgres wire) share them and answer with the same error codes and SQLSTATEs. See SQL for the SQL model and errors for retry behavior.

SQL statements ​

LimitValueRefusal
Statements per request or execute frame1 to 256invalid_request (400) before anything runs
Statement text16 KiB (16,384 UTF-8 bytes)sql_error (400) / SQLSTATE 0A000
HTTP request body1 MiBtoo_large (413) / 54000
WebSocket frame1 MiB (the first auth frame 16 KiB)close 1009
Result size10,000 rows and 4 MiBtoo_large (400) / 54000
Rows changed per transaction1,024too_large (400) / 54000
Database file growth per transaction8 MiBtoo_large (400) / 54000
Any value, string or row a statement builds16 MiBtoo_large (400) / 54000
Expression nesting200 levelssql_error (400) / 54001
Terms in a compound SELECT50sql_error (400) / 54001
LIKE or GLOB pattern1,000 bytessql_error (400) / 54001
Trigger and foreign-key cascade nesting32 levelssql_error (400) / 54001
Function arguments127sql_error (400) / 54023
Bound parameter number?8192sql_error (400) / 54023

A statement that needs more memory than the server can spare, including one that compiles to an oversized program, answers storage_busy (503) / 53200; retry it, and simplify it if it keeps failing.

A query that stays inside result limits but scans or works past the plan's scan budget answers query_canceled (400) / 57014 with query too expensive: it exceeds the work budget; add indexes or a LIMIT, or narrow the query. A request whose statements together spend more than 5 s executing answers query_canceled (400) / 57014 with the request exceeded its 5 s time limit; split the batch or narrow the query. Only statement and commit execution counts toward the 5 s; time spent admitted, queued or waiting on the organization's limits does not.

Transactions ​

SurfaceTransaction limit
HTTPOne request is one atomic batch, all or nothing. BEGIN STRONG … COMMIT may wrap the whole batch; other BEGIN, COMMIT and ROLLBACK are refused.
WebSocketbegin/commit/rollback frames. At most 5 seconds, then it rolls back.
Postgres wireBEGIN/COMMIT/ROLLBACK and savepoints. At most 5 seconds, then it rolls back.

A transaction left open past the limit rolls back and answers transaction_rolled_back (400) / 40000.

Postgres wire sessions ​

LimitValueOn exceed
Startup10 seconds to finish the handshake, packets at most 10,000 bytesconnection closed (08P01 on a bad packet)
Message size1 MiB per protocol messageconnection closed (08P01)
Prepared statements256 per session54000
Portals256 per session, holding at most 16 MiB of parameters and pending rows together54000
LISTEN channels64 per session54000
numeric values1,000 digits before and 1,000 after the decimal point22003 on results, 22P03 on binary parameters
Extensions, NOTIFY, CREATE SEQUENCE, two-phase commitnot supported0A000

Requests per organization ​

LimitFreeStarterProTeamEnterprise
Requests per second50200500500No limit
Burst requests1004001,0001,000No limit
Concurrent requests481616No limit
Query timeout1 s2 s5 s5 sNo limit
Scan budget, candidate rows10,00050,000100,000100,000No limit
Scan budget, bytes scanned16 MiB64 MiB128 MiB128 MiBNo limit
Live databases1525100No limit
Storage ceiling0.1 GB5 GB100 GB100 GBNo limit
Point-in-time retention1 day3 days7 days14 days30 days

Beyond the request, burst or concurrency limit, HTTP answers 429 tenant_busy (SQLSTATE 53300) with a Retry-After header; the Postgres wire answers SQLSTATE 53300. Past the storage ceiling a write answers 429 quota_exceeded (53100) over SQL and 429 storage_quota over file storage; neither sends Retry-After, and the file-storage message names the used and allowed gigabytes and the next step. Past the database allowance a create answers 409 database_limit. A database's point-in-time restore window reaches back at most its plan's retention; see backups and restore.

Monthly operation units and SQL read fair use ​

PlanOperation units includedWrite capSQL read fair use
Free50,00050,000500,000
Starter250,0002,500,0002,500,000
Pro2,000,00020,000,00020,000,000
Team5,000,00050,000,00050,000,000
Enterprise10,000,000No limitNo limit

One unit is each started 4 KiB. At the cap (the allowance on Free) new writes, and at fair use new SQL reads, answer 429 quota_exceeded (SQLSTATE 53100) until the next UTC month or an upgrade. Shape reads stay available. See pricing for billing and overage.