glomar
glomar
DTDrizzle Team
Created by christrading on 6/11/2024 in #help
LibsqlError: SQLITE_BUSY: database is locked
by default sqlite uses a busy timeout of 0. I've used this before I run a transaction to set the wait time.
await db.run(sql`PRAGMA busy_timeout = 10000;`);
await db.transaction(async () => {
... rest of transaction code ...
await db.run(sql`PRAGMA busy_timeout = 10000;`);
await db.transaction(async () => {
... rest of transaction code ...
5 replies