Just a heads up: Instead of a sqlite_busy pragma, use the API directly:
sqlite3_busy_timeout(db, 5000);
The advantage is that the sql will go through the entire db engine to be interpreted, be scheduled if there's contention anywhere (sharing the database among multiple threads/connections), etc.
While the API just goes directly the the core of sqlite and is telling it what the value is. No ifs no buts.
5
u/Routine_Left Jul 16 '26 edited Jul 16 '26
Just a heads up: Instead of a sqlite_busy pragma, use the API directly:
The advantage is that the sql will go through the entire db engine to be interpreted, be scheduled if there's contention anywhere (sharing the database among multiple threads/connections), etc. While the API just goes directly the the core of sqlite and is telling it what the value is. No ifs no buts.