Skip to content
Discord Get Started

Limits and Quotas

This page consolidates all operational limits, quotas, and safety boundaries across DB9. Most limits are fixed. Where a limit is configurable by the platform operator (not the end user), it is marked accordingly.

LimitAnonymousClaimed
Max databases (including branches)5Unlimited
Bearer token TTL90 days (auto-refresh)90 days (re-login to renew)
API token TTL365 days (default)365 days (default)
Feature accessFullFull

See Anonymous and Claimed Databases for the upgrade path.

LimitValueNotes
Max server connections1,000Configurable by operator
Statement timeout60 secondsConfigurable by operator; per-session override via SET statement_timeout
Idle-in-transaction timeout60 secondsConfigurable by operator
Idle tenant cache eviction5 minutesInactive tenants are unloaded from memory
Max advisory locks per connection4,096Configurable by operator
LimitValue
Max identifier length63 bytes
Max recursive CTE iterations1,000
Max view expansion depth64
Max generate_series rows1,000,000
Max NUMERIC precision1,000
Max NUMERIC display scale28
Max string output~1 GB
Sort memory (work_mem)256 MB default (configurable via GUC)
DML table scan max rows10,000 default (configurable via GUC)
DPCCP join reorder max relations8
Max COPY FROM STDIN line32 MB
LimitValue
Max vector dimensions16,384
Default embedding dimensions1,024
Embedding modeltext-embedding-v4 (configurable by operator)
Embedding request timeout30 seconds
Embedding connect timeout5 seconds
Embedding concurrency per tenant5
HNSW default M16
HNSW default ef_construction64
HNSW default ef_search40
LimitValue
Max requests per SQL statement100
Concurrent requests per tenant20 (5 reserved for interactive queries)
Request timeout5 seconds (1 second connect timeout)
Max response body1 MB
Max request body256 KB
Max redirects3
HTTPS onlyYes (SSRF protection blocks private IPs)

See HTTP from SQL for details.

LimitValue
Max file size100 MB
Max total bytes per glob query100 MB
Max files per glob10,000
Max directory entries (recursive)100,000
Max recursive depth10
WebSocket connections per tenant50
WebSocket auth timeout10 seconds
WebSocket idle timeout5 minutes
WebSocket max JSON frame2 MB

See Analyze Agent Logs with fs9 for usage patterns.

LimitValue
Global memory budget512 MB
Concurrent imports per tenant4
Max file size (via fs9)100 MB
HTTP fetch timeout60 seconds
HTTP max redirects5
LimitValue
Max jobs per database50
Max concurrent executions (global)32
Poll interval60 seconds (minimum scheduling granularity)
Default job timeout5 minutes (orphan timeout)
Max job timeout (cron-specific)30 minutes
Run history retention7 days

See Scheduled Jobs with pg_cron for details.

LimitValue
Max concurrent branch creations2
Branch clone timeout5 minutes
Branch clone max runtime10 minutes
Branches count toward database quotaYes

See Branching Workflows for details.

LimitValue
TTL range5–15 minutes (default 10 minutes)
SigningRS256 (public keys at JWKS endpoint)
Scopedb:connect (single database + role)

See Security and Auth for the full auth model.

LimitValue
Max suspended portals per connection32
Max suspended portal buffer rows10,000
Max suspended portal buffer bytes16 MB

These apply to PostgreSQL Extended Query protocol cursors and named portals.

LimitValue
Slow query threshold200 ms (configurable by operator)
Max sample events20,000 (configurable by operator)
Max sample groups50 (configurable by operator)
Max SQL length in traces512 bytes (configurable by operator)
Audit log retention90 days

These resources do not have explicit limits in the current release:

  • Database size — no per-database storage cap (bounded by TiKV cluster capacity)
  • Table count — no limit on tables per database
  • Column count — no per-table column limit beyond PostgreSQL conventions
  • Row size — no explicit row size limit
  • Transaction size — no limit on transaction data volume
  • Query parameter count — no explicit limit on bind parameters

These may change in future releases. For production capacity planning, monitor TiKV cluster metrics.

Platform operators can adjust these via environment variables on the db9-server:

VariableDefaultDescription
DB9_MAX_CONNECTIONS1,000Max concurrent pgwire connections
DB9_STATEMENT_TIMEOUT_MS60,000Default statement timeout
DB9_IDLE_IN_TRANSACTION_SESSION_TIMEOUT_MS60,000Idle-in-transaction timeout
DB9_TENANT_MEMORY_QUOTA_BYTES0 (unlimited)Per-tenant memory quota
DB9_TENANT_QPS_LIMIT0 (disabled)Per-tenant queries per second
DB9_MAX_ADVISORY_LOCKS_PER_CONNECTION4,096Advisory lock budget

Extension and worker limits are fixed and cannot be changed without redeploying the server.