According to the documentation of sqlite3.connect(), a timeout can be set:
When a database is accessed by multiple connections, and one of the processes modifies the database, the SQLite database is locked until that transaction is committed. The timeout parameter specifies how long the connection should wait for the lock to go away until raising an exception. The default for the timeout parameter is 5.0 (five seconds).
I just encountered such timeout: then I had deadlocks and nothing could be synced anymore. We may try to use a bigger timeout and see if this is a good move, something like 10 seconds.