Limits
SqliteFileSystem enforces a small set of configurable per-workspace
limits. The defaults live at
crates/fslite-sqlite/src/workspace.rs (opens in a new tab)
and apply to every new workspace; override them at create time
via SqliteFileSystem::create_workspace(WorkspaceOptions { ... }).
| Limit | Default | Notes |
|---|---|---|
max_bytes | 10 GiB | Active + trashed logical bytes. Enforced at every mutation; exceeded quota returns QuotaExceeded (HTTP 409). |
max_nodes | 1,000,000 | Active + trashed node count. |
max_file_bytes | 1 GiB | Per-regular-file logical size. Enforced incrementally as bytes stream in. |
| Attribute key length | ≤ 256 bytes | Bigger keys return InvalidPathOrName. |
| Attribute value length | ≤ 4 KiB | Bigger values return QuotaExceeded. |
| Attributes per node | ≤ 64 | Excess returns QuotaExceeded. |
| Symlink hops per path lookup | ≤ 40 | Excess returns LinkLoop (HTTP 409). |
| Content chunk size | 1 MiB | Immutable chunks on disk. Reads stream one chunk at a time; memory pressure is constant regardless of file size. |
Search/tree work budget | ≤ 5,000 rows per call | Exceeded WORK_BUDGET is silently capped. Use pagination via --limit for full result sets. |
Search/tree max subtree depth | ≤ 4,096 levels | Exceeded MAX_SUBTREE_DEPTH returns LinkLoop. |
| Pagination | server default 100, client PageRequest::limit overridden | --limit on the CLI is the same as Page::limit. |
Attribute values
Node::attributes is a serde_json::Map<String, Value>, so each
value is base64url-encoded into a JSON string when stored. That makes
the on-disk format self-describing for debugging, but it means a
4,096-byte raw attribute value can carry at most about
(4096 − base64 overhead) bytes of payload — about 3,072 bytes for a
typical all-bytes value.
What quota accounting covers
Quota violations count both active and trashed bytes/nodes. The
rationale: trashing a 9 GiB file in a 10 GiB workspace is not "free";
the workspace still holds it. To actually reclaim space, purge the
trash record. The usage verb (and fs.workspace_usage(ctx)) reports
both numbers distinctly so you can decide.
Overrides
Override any of max_bytes, max_nodes, max_file_bytes at create
time:
let opts = WorkspaceOptions {
max_bytes: 100 * 1024 * 1024 * 1024, // 100 GiB
max_nodes: 10_000_000,
max_file_bytes: 5 * 1024 * 1024 * 1024, // 5 GiB
};
let ws = fs.create_workspace(opts).await?;WorkspaceOptions is #[non_exhaustive], so constructing the struct
literally (as above) is the stable shape. Future releases may add
defaults to it without breaking callers.
The other limits (chunk size, attribute sizes, search budgets, etc.) are compile-time constants and cannot be overridden per-workspace.