PRAGMA journal_mode=WAL;
You can then read the database while it’s been written to by a separate process.