Soft limits
Bounds set by browsers, devices, and hosting services that the protocol does not enforce.
Bounds the protocol does not enforce: a browser, operating system, or hosting service sets them, or the code deliberately sets none. Most have no constant in this repository, change with a browser release or a vendor’s plan without a commit here, and surface as a platform error rather than a coded refusal. The bounds the code enforces are in hard limits; several of those exist to stay under a limit on this page, and the rows here say which.
Soft limits are of three kinds:
- Platform-set. The browser, WebView, or operating system decides, per device and per release.
- Plan-set. A hosting provider sets it for the account’s plan or configuration. Vendor values were read from the linked vendor pages in November 2026; those pages, not this one, are the source of truth.
- Open. The code deliberately sets no bound, so the limits beneath it are the only ones.
Not yet handled collects the soft limits that nothing in the code detects or works around.
Browser storage
Every shell keeps local data in its WebView’s origin storage: OPFS for the SQLite databases, blobs, and desktop state, IndexedDB for the local keyring, and localStorage and sessionStorage for preferences (resetting this device). Values follow MDN’s storage quotas and eviction criteria.
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| Origin quota | Platform-set, per origin and device. Chromium allows up to 60% of the disk; Firefox the smaller of 10% of the disk or 10 GiB for best-effort data, and 50% once persistent; WebKit about 60% per origin and 80% across origins in browser apps. OPFS, IndexedDB, and the service worker’s precache share it. | Nothing checks it before a write. The System Monitor mini-app shows navigator.storage.estimate() (environmentSources.ts). |
A write fails as an ordinary SQLite or blob-store error; no code recognizes QuotaExceededError or SQLITE_FULL. |
| Best-effort eviction | Platform-set. Under storage pressure a browser clears whole origins, least recently used first, unless the origin’s storage is persistent. | The SDK asks navigator.storage.persist() (storagePersistence.ts). The app starts that request before the first persistent write and does not wait for it, since Firefox leaves it pending until the user answers; Chromium and Safari grant or deny silently. A denial is only logged: “durable storage not granted … may be evicted” (bootSQLiteRuntime.ts, OPFS local storage). |
The device starts over as a fresh install: queued writes that never synced are lost, and the recovery phrase signs the identity back in. If only part of the bucket goes, the database reads as SQLITE_NOTADB and useUnreadableDatabaseRecovery.ts wipes and recreates it, once per database name. |
| Safari inactivity deletion | Platform-set. With tracking prevention on, Safari deletes script-written storage of an origin with no user interaction in seven days of use; home-screen web apps are exempt. | The keyring manifest lives in IndexedDB beside its wrapping key, not in localStorage, so the keyring and the OPFS database are evicted together or not at all (indexedDbManifestStore.ts). |
As for eviction: a fresh device. |
| localStorage and sessionStorage | Platform-set; a few MiB per origin. | Preferences are best-effort and a failed write is ignored (storedPreference.ts). A host without working localStorage opens read windows that count nothing. |
The preference reverts on the next load. |
| Private browsing | Platform-set: storage lasts only for the session, often under a smaller quota. | Nothing detects it. | Closing the window resets the device. |
| Secure context | Platform rule: OPFS, crypto.subtle, Web Locks, storage.persist(), and service workers exist only on HTTPS and loopback origins. |
SQLite setup requires one for OPFS. Without OPFS the automatic policy selects in-memory SQLite, and an explicit "opfs-sahpool" request fails. |
Served over plain HTTP from a LAN address, the app has no durable storage and no Web Crypto. |
| Storage is per origin | Platform rule: scheme, host, and port together name the storage. | Electrobun serves the app from a fixed http://127.0.0.1:3002 (index.ts); Capacitor fixes androidScheme and iosScheme to https (capacitor.config.ts). |
A changed origin opens an empty device beside the old data. |
Client SQLite and OPFS
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| WebAssembly heap | 2 GiB: the SQLite3MultipleCiphers build that buildSqliteMultipleCiphers.sh downloads grows to at most 32,768 pages of 64 KiB; nothing here sets it. |
An OPFS database keeps only its page cache in the heap. A "memory" database, the fallback without OPFS, lives in it whole. Nothing measures heap use. |
SQLite allocations in the worker fail. |
| Access-handle exclusivity | Platform rule: a SyncAccessHandle locks its file for the whole origin. The SAHPool VFS holds one per pooled file and reserves 12 (SAHPOOL_MINIMUM_CAPACITY, loadSqlite3.ts). |
Install retries NoModificationAllowedError for 3 s, backing off from 150 ms to 600 ms. Tabs share one owner worker’s handle, kept apart by the transaction lease. |
Boot fails and retries on a fresh worker. |
| Android WebView handle pressure | Platform behavior: while an earlier worker still releases its handles, createSyncAccessHandle can hang, neither resolving nor rejecting. |
Each acquiring step races 8 s (SAHPOOL_STEP_HANG_TIMEOUT_MS, sahPoolHangTimeout.ts), below the app’s 15 s boot round trip, so the worker fails, is torn down, and boot retries. |
Boot takes longer while the origin drains. |
| Back/forward cache | Platform behavior: a navigation can freeze the outgoing page together with its SQLite worker, which keeps its access handles. | The page releases its runtime on pagehide and reloads on a persisted pageshow (useReleaseRuntimeOnPageHide.ts); in Chromium the next page evicts cached pages through a BroadcastChannel they hold open (cachedPageEviction.ts). The native persistence checks cover CEF (#2859). |
The next page meets contention until the cache lets go. |
| Main-thread OPFS on WKWebView | Platform-set: iOS and macOS WKWebView expose no navigator.storage.getDirectory on the main thread. |
The Capacitor and Electrobun shells force the persistent policy rather than auto-detect it, and a device reset has the worker wipe OPFS before it opens anything (resetting this device). | Auto-detection would select memory storage. |
| Worker OPFS on WebKitGTK | Platform-set: the Linux system renderer can omit the worker OPFS APIs the SAHPool VFS needs. | Electrobun bundles CEF on Linux and Windows (desktop development). | — |
| A second worker in a WebView | Platform behavior: constructing a second dedicated worker fails in the mobile and desktop WebViews. | The shells set reuseDatabaseWorker: true and keep one SQLite worker across identity switches (sqliteRuntimeLifecycle.ts). |
— |
Keyring and IndexedDB
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
CryptoKey cloning on WKWebView |
Platform-set: WKWebView shells cannot structured-clone a CryptoKey into IndexedDB. |
createWebViewLocalKeyring() stores raw AES-256 bytes instead, which is weaker at rest (local keyring). |
— |
Hung indexedDB.open() on WKWebView |
Platform behavior: an open can fire no success, error, or blocked event. | Keyring connections are cached and reused, and a cipher-key derivation is bounded at 15 s (sqliteCipherKey.ts). |
The unlock fails at the bound rather than hanging. |
Tabs and page lifecycle
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| Web Locks | Platform-set availability. | Loro read windows, peer seeds, schema migration, and the blob store take Web Locks. A host without them, or whose request is refused, opens no read window, and the blob store runs unlocked. | — |
| Frozen background tabs | Platform behavior: a frozen or discarded tab runs no script and cannot unload. | A device reset waits for every tab to unload. A frozen tab’s open transaction is rolled back once another tab waits on it (database connections). | A reset times out and reports a failure. |
Mobile and desktop shells
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| App suspension | Platform-set: a suspended iOS app runs nothing, and the app requests no background execution time. | Writes and uploads are durable queues that resume on return. On resume or a network change the socket is replaced, because WKWebView can keep an OPEN WebSocket whose connection is gone (client sync ordering). |
Sync pauses while suspended. |
Android navigator.onLine |
Platform behavior: Android WebViews misreport connectivity. | The Capacitor shell supplies a native network source (network failures). | — |
| Cross-origin fetch on WKWebView | Platform behavior: requests from the Capacitor origin fail with “Load failed”. | CapacitorHttp carries every request (capacitor.config.ts). |
— |
| Native HTTP bridge | Platform-set: the bridge buffers whole bodies and ignores abort. | Upload parts stay at most 32 MiB. A download without a body stream is buffered whole (blobDownloadBody.ts, blob attachment service). |
Memory grows with the attachment. |
| Downloads and printing | Platform-set: WebViews have no download destination and no print dialog. | Each WebView shell injects a native file saver, since the browser’s download-link click does nothing there (host ports). | — |
| Native cache directory | Platform-set: the operating system may reclaim it. | Decrypted share and preview copies are staged there and cleared by clearNativeCache (capacitorFileSaver.ts). |
A reclaimed copy is staged again when next needed. |
Cloudflare Workers
Values follow the Workers limits.
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| Isolate memory | 128 MB per isolate, JavaScript heap and WebAssembly together, shared by its concurrent requests. | Response pages are 48 MiB so a page and its JSON copy fit, and body admission reserves at most 96 MiB across concurrent requests. | Admission answers 503 with Retry-After: 1 first; past it Cloudflare ends the isolate. |
| CPU time | Plan-set: 30 s by default, configurable to 5 minutes on Paid. | The API sets 120 s (limits.cpu_ms in wrangler.jsonc), because registration issues about a thousand queries in one transaction. The request-cost log records CPU per request. |
The invocation is cancelled. |
| Outbound connections | Six per invocation waiting for response headers; a seventh waits. A socket opened by one request cannot serve another. | Each request has its own Postgres pool of at most four (postgresConfig.ts, database connections). |
Acquisition waits, times out after 5 s, and the request returns 503. |
| Subrequests | Plan-set: 10,000 per invocation by default on Paid, 50 on Free. | Nothing counts them. A blob sweep lists at most 1,000 objects to delete or abort per call, 100 by default (pendingBlobObjectDeletion.ts). |
Further fetch calls fail. |
| Duration | No wall-clock limit on an HTTP invocation while its client stays connected; waitUntil work runs at most 30 s past the response, and a Cron invocation at most 15 minutes. Cloudflare’s proxy read timeout, 125 s by default, still bounds a response’s headers. |
Cold principal recovery pages its work. A placement hint keeps registration’s sequential queries near the database (infrastructure). The baseline-stage sweep stops at five minutes, and a greenfield reset drains for 15.5 minutes. | A response later than the proxy timeout fails at the client even when its write commits. |
| Request body | Plan-set: 100 MB on Free and Pro, 200 MB on Business, 500 MB on Enterprise. | Every API route ceiling is at most 32 MiB, and blob bytes go straight to R2. | Not reached. |
| Script size | Plan-set: 10 MB compressed on Paid, 3 MB on Free. | The bundle carries Loro’s WebAssembly, the AWS SDK, and Sentry; nothing compares it with the limit. | The deploy fails. |
| Runtime WebAssembly compilation | Platform rule: a Worker cannot compile WebAssembly at runtime. | wrangler.jsonc aliases loro-crdt to a build initialized from the module Wrangler compiles. |
— |
| Logs | Best-effort delivery under plan-set retention. | Missing events read as unavailable, never as zero (registration artifact batch). | — |
Durable Objects
Values follow the Durable Objects limits.
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| One object per name | Platform rule: an object runs one event at a time, with a soft limit of about 1,000 requests a second. Both objects are global singletons: KeyValueStore (default) holds every session, sign-in challenge, and WebSocket ticket, and RealtimeHub (hub) owns every socket (environment.ts). |
Serial events make each key/value method atomic without locks (keyValueStoreObject.ts). Nothing shards either object. |
Requests queue, then fail as overloaded. |
| Storage per object | Plan-set: 10 GB for a SQLite-backed object on Paid, 1 GB on Free; a stored value at most 2 MB, a socket attachment at most 2 KiB. | The hub stores interest sets in rows of 16 Ki characters (hubSocketStore.ts); the key/value store sweeps expired keys hourly. |
Writes fail with “database or disk is full”. |
| WebSocket message received | 32 MiB. | Client messages are capped at 1,000,000 bytes, the Bun listener’s payload bound. | Not reached. |
| Hibernation and eviction | Platform-set: an idle object hibernates, an evicted one loses its memory, and waitUntil holds one for at most 15 minutes. |
Socket routing state is stored, so sockets survive hibernation, and the hub keeps no idle timer or pool resident (hub hibernation). Moved-container memory and pending Sentry counts are accepted as lost. | What an eviction loses is listed in realtime hints. |
| Alarms | Platform rule: one alarm per object, never run beside another. | Idle hub callbacks share one durable alarm, with a temporary timer while an event awaits I/O so a slow recheck cannot defer a deadline (hubAlarmScheduler.ts). |
— |
Postgres and Hyperdrive
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| Hyperdrive origin connections | 20 per tier (origin_connection_limit in hyperdrive.tf). Hyperdrive may exceed it during network failures, and Paid plans allow far more per configuration (Hyperdrive limits). |
Each request’s own pool holds at most four connections to Hyperdrive, and PgBouncer shares the PS-5 server pool (Postgres stack). | Hyperdrive queues work for an origin connection within its service limits. |
| Statement duration | 60 s per statement through Hyperdrive. | Nothing in the API bounds statement time. | Hyperdrive ends the statement. |
| Transaction pooling | Platform rule: Hyperdrive pools in transaction mode, so session state such as SET, session advisory locks, and LISTEN does not outlast a transaction. |
Locks are transaction-scoped (pg_advisory_xact_lock, principalMutationLock.ts). |
— |
| Bind parameters | 65,535 per statement. | Span and peer-owner rows go in statements of 8,192 rows (documentPeerRowChunks.ts). |
Postgres refuses the statement. |
text values |
Platform rule: no U+0000 or lone surrogate. | Validators refuse them first (document sync). | Refusal (400). |
Object storage
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| Multipart parts | S3 and R2: every part but the last at least 5 MiB, at most 10,000 parts. | Blobs are 5 MiB chunks, at most 10,000, one per part, and part numbers are bounded by the staged size (API persistence). | Refusal (400) before the store is asked. |
| Presigned URLs | SigV4 allows up to seven days; R2 sends no CORS headers with an expired-URL response. | The API signs for 300 s, never past the stage’s life, and the client refreshes once before streaming through the API. | — |
| Checksums | R2 rejects the SDK’s flexible checksums (x-amz-checksum-*). |
Uploads sign Content-MD5 (R2 module). |
— |
| Incomplete uploads | A lifecycle rule aborts them after seven days (main.tf). |
— | Their parts are deleted. |
| Throttling | Plan-set and unpublished. | Object deletes run 16 at a time (blobMaintenance.ts). |
— |
| Non-empty buckets | R2 refuses to delete one. | A greenfield reset relies on it to stop a teardown that a straggler wrote into. | — |
Third-party services
| Limit | Value | How the code lives with it | Past the limit |
|---|---|---|---|
| Sentry project quota | Plan-set. | Reports are budgeted locally: five a minute and twenty a page load in a client, five a minute and twenty an hour in each API isolate, never across the service (Sentry, API diagnostics). | Excess reports drop locally. |
| Stripe timing | Incomplete subscriptions expire after 23 hours; a Checkout Session’s expires_at must be at least 30 minutes ahead; search is eventually consistent. |
Inline attempts rotate at 22 hours, hosted retries rotate with 31 minutes left, and a 429 is a provider failure rather than a refusal (billing). | — |
| RevenueCat redelivery | Plan-set retry schedule. | The API answers 503 without claiming an event it cannot resolve yet, and relies on RevenueCat’s redelivery (billing). | — |
| npm versions | A published version can never be reused. | A package publishes only a version newer than npm’s latest (versions). |
The publish is refused. |
Open bounds
- Request rate. The session API has no per-client rate limit. The re-cite pass’s cap and pacing are advisory SDK limits; only two-factor lockout and sockets per session answer 429.
- Staged bytes. No storage quota counts them; the document-sync bounds are the whole limit.
- Retained history. Principal-history tables have no automatic pruning, and retained signed evidence grows with accepted history.
- Replicas. The API’s worker limits apply per process, not across replicas, and the Sentry budgets per isolate.
- Cold verification. Neither the principal-history model nor its numeric domain promises bounded cold memory, transfer size, or verification time, and its acceptance tests do not run on deployed Cloudflare, so the isolate memory, CPU time, and proxy timeout above are its real bounds.
Not yet handled
- Quota exhaustion. Nothing estimates storage before a write or recognizes a quota error after one.
- Private browsing. Nothing tells the user that the device will reset when the window closes.
- WebAssembly heap. Nothing measures the 2 GiB SQLite heap, which bounds a
"memory"database whole. - Backup size. An export serializes the whole database and every
attachment into one string (
localBackupFormat.ts) and encrypts it in one call, so the engine’s maximum string length and the page’s memory bound it. - WebView process termination. Nothing handles the operating system ending a WebView’s content process under memory pressure.
- Durable Object singletons. One
KeyValueStoreand oneRealtimeHubserve every session and socket, under one object’s request rate and 10 GB. - Statement duration. Nothing keeps a statement under Hyperdrive’s 60 s.
- Script size. Nothing compares the Worker bundle with the plan’s limit.