SQLITE_BUSY: database is locked

I'm seeing this error after increasing the amount of concurrent write operations I was performing. Has anyone else had to deal with this? (better-sqlite3 on node.js)
1 Reply
Mozart's_Ghost
Mozart's_Ghost7mo ago
I ran into this a while back. Nearly pulled my hair out. It happened to me when I had a READ as the first action in the body of the transaction call back. It is an sqlite thing. Here is the documentation that was relevant to my issue "If the first statement after BEGIN DEFERRED is a SELECT, then a read transaction is started. Subsequent write statements will upgrade the transaction to a write transaction if possible, or return SQLITE_BUSY" https://www.sqlite.org/lang_transaction.html#deferred_immediate_and_exclusive_transactions It will probably help a lot if you read that whole page
Want results from more Discord servers?
Add your server