# Limits

Source: https://dropshelf.ai/docs/reference/limits

Every limit a dropshelf member or agent can meet, with its default, the configuration key that sets it and the answer past it.

This page lists every limit a member, a script or an agent can meet on a dropshelf instance, with
its default. Your admin may set other values: the **Set by** column names the
[configuration](/docs/reference/configuration) key, and a limit marked fixed is the same on every
instance. Sizes are binary, so `100MB` is 100 MiB. Where a key's default is `0`, `0` means no limit.

## How a limit answers [#how-a-limit-answers]

Past a limit, the REST API, the MCP server and the drop host answer with an HTTP status and a
sentence that names the limit. The `dropshelf` CLI turns the status into its exit code:

| Status | Meaning | CLI exit code |
| --- | --- | --- |
| 400 | A value is too long or out of range. | 1 `failure` |
| 403 | A member's drop or storage limit is reached. | 5 `limit` |
| 409 | A drop already has as many people as it can be shared with. | 4 `conflict` |
| 413 | One upload, file or document is too large. | 5 `limit` |
| 422 | A deploy breaks a file limit, or a query answer is too large. | 1 `failure` |
| 429 | Too many writes or queries in a minute. Retry after `Retry-After`. | 1 `failure` |
| 503 | A replica is at capacity. Retry after `Retry-After`. | 1 `failure` |
| 507 | A drop's data or assets are full. | 5 `limit` |

The [CLI reference](/docs/reference/cli#exit-codes) lists every exit code.

## Publishing [#publishing]

These limits apply to each deploy, from the dashboard, the CLI, an agent or the API. For a folder,
the dashboard checks the file count and sizes before it uploads.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| Compressed upload, one zip | `100MB` | [`deploy.maxZipBytes`](/docs/reference/configuration#deploy) | 413 |
| Files in one deploy | `5000` | [`deploy.maxFiles`](/docs/reference/configuration#deploy) | 422 |
| One file, uncompressed | `25MB` | [`deploy.maxFileBytes`](/docs/reference/configuration#deploy) | 422 |
| All files together, uncompressed | `500MB` | [`deploy.maxTotalBytes`](/docs/reference/configuration#deploy) | 422 |
| Content sent inside a plan | 5 MB | Fixed | 413 |
| Deploys running at once, per replica | `4` | [`deploy.maxConcurrentDeploys`](/docs/reference/configuration#deploy) | 503 with `Retry-After` |
| Deploys running at once, per drop | 1 | Fixed | 409 |

The CLI waits through a 503 and tries again, every 5 seconds for about two minutes. A deploy to a
drop that already has one running is a 409: wait for it to finish, then retry.

## Versions and retention [#versions-and-retention]

These limits decide how long a drop lives and how many of its versions stay.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| Earlier published versions kept per drop | `5` | [`deploy.keepHistory`](/docs/reference/configuration#deploy) | Older ones are purged |
| Drafts kept per drop | `5` | [`deploy.keepDrafts`](/docs/reference/configuration#deploy) | Older ones are purged |
| Longest retention a member may choose | `365d` | [`retention.maxCustom`](/docs/reference/configuration#retention) | 400 |
| Keeping a drop Forever | Allowed | [`retention.allowForever`](/docs/reference/configuration#retention) | 400 |

A purged version stays listed, and a publish of it answers 410. An editor may extend a drop's
retention but not shorten it.

## Per member [#per-member]

These limits count what each member owns. Admins are exempt from both. An editor's upload to your
drop counts against your limits, because it is your drop.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| Live drops one member owns | `100` | [`limits.maxDropsPerUser`](/docs/reference/configuration#limits) | 403, exit code 5 |
| Bytes one member's live versions hold | `0`, no limit | [`limits.maxLiveBytesPerUser`](/docs/reference/configuration#limits) | 403, exit code 5 |

The byte limit counts the version each drop serves and uploads still running. Kept versions and
drafts do not count. A publish of a draft or an older version is checked the same way as an upload.
The **Drops** and **Storage** meters above your account in the dashboard's sidebar show where you
stand. Deleting a drop frees its slot and its bytes at once.

## Sharing, comments and profiles [#sharing-comments-and-profiles]

These limits apply to the people on a drop and to what members write.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| People one drop is shared with | 200 | Fixed | 409, exit code 4 |
| One comment, in bytes after trimming | `4096` | [`social.maxCommentBytes`](/docs/reference/configuration#social) | 400 |
| People mentioned in one comment | 10 | Fixed | 400 |
| A bio, in bytes after trimming | `1024` | [`profiles.maxBioBytes`](/docs/reference/configuration#profiles) | 400 |
| A profile picture | `2MB` | [`profiles.maxAvatarBytes`](/docs/reference/configuration#profiles) | 413 |

Comment and bio limits count bytes, not characters, so accented and non-Latin letters reach them
sooner.

## Tokens [#tokens]

These limits decide how long a personal access token and an agent's sign-in last.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| Token lifetime when none is named | `90d` | [`tokens.defaultTTL`](/docs/reference/configuration#tokens) | Not applicable |
| Longest token or agent sign-in | `365d` | [`tokens.maxTTL`](/docs/reference/configuration#tokens) | Shortened to it, not refused |
| An agent's sign-in without use | `30d` | [`auth.oauth.idleTTL`](/docs/reference/configuration#auth) | Ends; sign in again |
| An agent's access token before it renews | `1h` | [`auth.oauth.accessTokenTTL`](/docs/reference/configuration#auth) | Renewed by the agent |
| A token's name | 64 characters | Fixed | 400 |

A request for a token that would outlive `tokens.maxTTL` gets one that ends at it. When an agent's
sign-in ends, the CLI exits with code 3 `sign_in` until you sign in again.

## Drop data [#drop-data]

These limits apply to a drop's document database, which an admin turns on. A page can read its
instance's values rather than assume them.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| Collections in one drop | `50` | [`platform.db.maxCollectionsPerDrop`](/docs/reference/configuration#platform) | 507 |
| Documents in one drop | `20000` | [`platform.db.maxDocsPerDrop`](/docs/reference/configuration#platform) | 507 |
| Documents one member owns in one drop | `5000` | [`platform.db.maxDocsPerMemberPerDrop`](/docs/reference/configuration#platform) | 507 |
| One document | `64KB` | [`platform.db.maxDocBytes`](/docs/reference/configuration#platform) | 413 |
| All documents in one drop | `64MB` | [`platform.db.maxBytesPerDrop`](/docs/reference/configuration#platform) | 507 |
| One import through the API | `16MB` | [`platform.db.maxImportBytes`](/docs/reference/configuration#platform) | 413 |
| Writes per member per minute | `300` | [`platform.db.writesPerMinutePerMember`](/docs/reference/configuration#platform) | 429 with `Retry-After` |
| Live streams open on one drop, per replica | `500` | [`platform.db.maxSubscribersPerDrop`](/docs/reference/configuration#platform) | 503 with `Retry-After` |
| Live streams one member opens in one drop, per replica | `20` | [`platform.db.maxSubscribersPerMember`](/docs/reference/configuration#platform) | 503 with `Retry-After` |
| Live streams open on one replica | `5000` | [`platform.db.maxSubscribers`](/docs/reference/configuration#platform) | 503 with `Retry-After` |

Some limits of the data API are fixed:

- A list takes at most 8 filters, an `in` filter at most 100 values, and a page at most 200
  documents.
- One delete names at most 1,000 documents.
- Over MCP, one `import_collection` call takes at most 1,000 documents and 1 MB.
- A collection name is 1 to 64 characters and a document id 1 to 128.

## Uploaded assets [#uploaded-assets]

These limits apply to files a drop's visitors upload, which an admin turns on.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| One asset | `25MB` | [`platform.assets.maxFileBytes`](/docs/reference/configuration#platform) | 413 |
| All assets in one drop | `500MB` | [`platform.assets.maxBytesPerDrop`](/docs/reference/configuration#platform) | 507 |
| Uploads and deletes per member per minute | `30` | [`platform.assets.writesPerMinutePerMember`](/docs/reference/configuration#platform) | 429 with `Retry-After` |
| Uploads one member runs at once in one drop | 2 | Fixed | 429 with `Retry-After` |
| Uploads one member runs at once across drops | 4 | Fixed | 429 with `Retry-After` |

A replica taking as many uploads as it can answers 503 with `Retry-After`. Deleting an asset frees
its room at once.

## Company data [#company-data]

These limits apply to the queries a drop runs against a connector source, which an admin turns on.
The per-query defaults below apply to every new source, and an admin can set other values on each
source.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| Query runs per drop per minute, per replica | `120` | [`connectors.runsPerMinutePerDrop`](/docs/reference/configuration#connectors) | 429 with `Retry-After` |
| How long an answer is cached | `15m` | [`connectors.defaults.cache`](/docs/reference/configuration#connectors) | Not applicable |
| Shortest cache a query may ask for | `1m` | [`connectors.defaults.minCache`](/docs/reference/configuration#connectors) | The deploy is refused |
| How long one query may run | `30s` | [`connectors.defaults.timeout`](/docs/reference/configuration#connectors) | 504 |
| Rows one query returns | `10000` | [`connectors.defaults.maxRows`](/docs/reference/configuration#connectors) | 422 |
| One answer | `5MB` | [`connectors.defaults.maxBytes`](/docs/reference/configuration#connectors) | 422 |
| Connections one source opens, per replica | `4` | [`connectors.defaults.maxConcurrent`](/docs/reference/configuration#connectors) | 503 with `Retry-After` |
| A `string` parameter | 1,000 characters | Fixed | 400 |
| Rows from the MCP tool `run_query` | 100 | Fixed | 422 |

Answers served from the cache do not count against the runs per minute. To stay under the row and
size limits, aggregate the query or add a `LIMIT`.

## Names [#names]

These limits apply to the names members choose.

| Limit | Default | Set by | Over the limit |
| --- | --- | --- | --- |
| A drop's address | 1 to 53 lowercase letters, digits and hyphens | Fixed | 400 |
| Reserved addresses | 26 names, such as `www`, `api` and `admin` | [`slugs.reserved`](/docs/reference/configuration#slugs) | 409 |
| A drop's name | 120 characters | Fixed | 400 |
| A drop's description | 1,000 characters | Fixed | 400 |

An address may not start or end with a hyphen, or hold two hyphens in a row. An address another live
drop uses is a 409 too.
