I learned about BEGIN IMMEDIATE TRANSACTION.
And there's also busy_timeout.
The article also explains why/how/when things occur in detail which is valuable.
I suggest reading the manual on the section: "Sometimes Queries Return SQLITE_BUSY In WAL Mode"
https://sqlite.org/wal.html#sometimes_queries_return_sqlite_...
Reads returning busy is rare under WAL, but WAL mode does very little for writer-writer contention.
I learned about BEGIN IMMEDIATE TRANSACTION.
And there's also busy_timeout.
The article also explains why/how/when things occur in detail which is valuable.