Have you tried journal_mode=wal?
https://sqlite.org/pragma.html#pragma_journal_mode
This lets sqlite read w/o a write lock (among other things)
Since it stores the log to an adjacent file you have to make sure the process can write to the whole directory containing the db.
Will give that a shot, thanks!
Re:Cross-Database Queries in SQLite
by philipyoungg on Monday February 22, 2021 @07:15AM
(#26223621)
Please update us about this!
Yes this is a heavy query that would not make it to a production system, still I am surprised that load placed on a sqlite db by "hundreds of thousands of concurrent users" would not surface problems due to this simple detail.