Per-project caps a platform sets below its plan: database and file size, requests per second, connections, realtime, end users, Edge Functions. Enforced by StitchDB.
Your plan sets the limits of your organization. Each project can get its own, lower caps with PATCH /projects/<ref>/limits (or limits when creating it). A cap can only lower a limit; null removes it.
Terminal
curl -X PATCH https://stitchdb.com/platform/v1/projects/<ref>/limits \
-H "Authorization: Bearer $STITCHDB_TOKEN" -H 'Content-Type: application/json' \
-d '{ "db_size_mb": 500, "storage_size_mb": 1024, "api_rps": 25, "auth_users": 5000 }'| Cap | When reached |
|---|---|
db_size_mb | The database becomes read-only (reads keep working) until it is back under the cap; limit.reached is sent |
storage_size_mb | Uploads are refused with 413 |
file_upload_mb | Larger files are refused |
api_rps | Requests over the rate get 429 (per project) |
max_rows, statement_timeout_s | REST responses / queries are capped |
pooler_clients, direct_connections | Further connections are refused |
realtime_concurrent_users, realtime_events_per_second | Realtime refuses more clients / throttles |
auth_users | New end-user sign-ups are refused; existing users keep signing in |
function_max, function_invocations_month, function_memory_mb, function_wall_s | Deploys refused / invocations get 429 / functions stopped |
auth_emails_per_hour | Auth e-mails are rate limited |
GET /projects/<ref>/limits returns the plan limits, the caps and the effective limits. Size checks run every few minutes; rate and connection limits apply at once.