4 ms·
You 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
by benbjohnson 5y ago
You 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.