see https://www.sqlite.org/wal.html for more details and note that
SQLite 3.22.0 or later is required to support read-only operations
- Show warning in log if writing cached data to database is slow
+ - Try database query for up to 5 seconds when database is busy or locked
+ instead of giving up immediately
2.2 / 28-Apr-2018
#define WALDBCHECKPOINTINTERVALMINS 240
#define SLOWDBFLUSHWARNLIMIT 3.0
+/* database read timeout */
+#define DBREADTIMEOUTSECS 5
+
/* no transparency by default */
#define TRANSBG 0
db_close();
return 0;
}
- /* set/increase busy timeout to 5 seconds */
} else {
- sqlite3_busy_timeout(db, 5000);
+ /* set busy timeout when database is open in read-only mode */
+ sqlite3_busy_timeout(db, DBREADTIMEOUTSECS * 1000);
}
if (!createdb) {