3 ms·
One the queries will fail with something like SQLITE_BUSY
by tyilo 5y ago
One the queries will fail with something like SQLITE_BUSY
- benbjohnson 5y agoYou need to explicitly set the “busy_timeout” PRAGMA to allow concurrent write queries to block under WAL mode. Otherwise the query will return a BUSY error. I wrote up some tips/caveats on the Litestream site with more explanation. https://litestream.io/tips/ https://litestream.io/tips/ Generally there’s just a few settings you want to set when developing with SQLite: PRAGMA journal_mode = wal; PRAGMA busy_timeout = 5000; Also worth setting STRICT mode and setting SYNCHRONOUS to NORMAL but those are less important.