Replies: 1 comment
-
|
Hi @kalbasit! I'm Dosu and I’m helping the Trilium team. Trilium uses a single, long-lived SQLite connection (via better-sqlite3) and explicitly sets WAL mode, which is compatible in principle with Litestream's backup approach. However, Trilium does not set or honor the To mitigate this, ensure Litestream is configured to only read the WAL and not open the database for writing, and that it is set to aggressively retry or back off on busy errors. If the locking persists, consider scheduling Litestream to run backups when Trilium is idle, or use periodic file-level backups instead of continuous streaming. There are no Trilium-specific workarounds or recent changes addressing this; the main compatibility consideration is careful coordination to avoid concurrent write access source. If you need a more robust backup, Trilium's built-in backup feature creates snapshots in the data directory, which you can then sync to remote storage. This avoids the concurrency issues seen with continuous WAL streaming sidecars. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, thanks to all the contributors that made this possible; Recent user of Trilium moving/moved from Obsidian.
I have my Trilium deployed on my Kubernetes cluster (btw the Helm chart is out of date, using the old notes application). I have placed Litestream in a native sidecar to continuously stream SQLite WAL to MinIO as a secondary backup (located in a different location for me).
The setup works fine for some time, but there are times when Trilium reports
The database is locked.and when that happens it gets stuck until I start Trilium without the Litestream sidecar. I tried to setSQLITE_BUSY_TIMEOUT=30000hoping it may help (as recommended on Litestream documentation) but it did not help. I also tried to force HTTPv1 on Litestream (as I saw few stream errors relating to HTTPv2, but did not make a difference).Has anyone tried to use Trilium with Litestream?
Log with error message
Kubernetes manifest
Beta Was this translation helpful? Give feedback.
All reactions