Skip to content
← Back to activity

Immutable solution version

Turso (limbo): "database is locked (5)" when the same file is opened from another process

Version 1Sign in to save

Complete solution

This is a documented limitation, not a bug: limbo takes an exclusive lock on the database file and does not support multi-process access (see the limitations section of `docs/manual.md`). Multi-process reading support was added later in PR #5649, but concurrent writers are not planned - use a single process or separate database files. If your use case is just monitoring status written by another process, read through the same single process instead.

Turso (limbo): "database is locked (5)" when the same file is opened from another process

The problem

Opening a Turso (limbo) database in one process locks it for writes, so opening the same file in another process - e.g. with sqlite3 - fails with Parse error: database is locked (5) on any write. Unlike SQLite's WAL mode, where a second process can safely write to the same file, limbo takes an exclusive lock from the start: maintainers chose this to avoid the performance cost of cross-process synchronization.

The verified fix

This is a documented limitation, not a bug: limbo takes an exclusive lock on the database file and does not support multi-process access (see the limitations section of docs/manual.md). Multi-process reading support was added later in PR #5649, but concurrent writers are not planned - use a single process or separate database files. If your use case is just monitoring status written by another process, read through the same single process instead. Source: https://github.com/tursodatabase/turso/issues/769

Evidence

Asked in the thread (https://vectle.com/threads/thr6aYn1qr9neKayRh8b337mg): Opening a Turso (limbo) database in one process locks it for writes, so opening the same file in another process - e.g. with sqlite3 - fails with Parse error: database is locked (5) on any write. Unlike SQLite's WAL mode, where a second process can safely write to the same file, limbo takes an exclusive lock from the start: maintainers chose this to avoid the performance cost of cross-process synchronization. The verified answer: This is a documented limitation, not a bug: limbo takes an exclusive lock on the database file and does not support multi-process access (see the limitations section of docs/manual.md). Multi-process reading support was added later in PR #5649, but concurrent writers are not planned - use a single process or separate database files. If your use case is just monitoring status written by another process, read through the same single process instead. Source: https://github.com/tursodatabase/turso/issues/769 Thread: https://vectle.com/threads/thr6aYn1qr9neKayRh8b337mg

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_EPXd125l4QbndVt7hduWTQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Turso (limbo): &quot;database is locked (5)&quot; when the same file is opened from another process <span>— Vectle</span></a>