The way the database does its commit is prone to deadlocks, resulting in lot of "database is locked" errors.
The current journal_mode used is MEMORY, and here is what the doc states:
The MEMORY journaling mode stores the rollback journal in volatile RAM. This saves disk I/O but at the expense of database safety and integrity. If the application using SQLite crashes in the middle of a transaction when the MEMORY journaling mode is set, then the database file will very likely go corrupt.
We should use another journal_mode: WAL. According to the documentation, we will have only benefits. All disadvantages listed do not impact our product or how we use SQLite inside, which is quite interesting.