I have two processes:
I know that with SQLite, any writes lock the whole database and so sometimes the second process can fail with a locked database.
Is there anything you can suggest that would completely remove the need for these two processes to touch the same database? For example, could I atomically transfer the data from the database being written to a second read-only database?
Thanks :)
You can configure the connection to the database in the second process to wait for a certain time when it encounters a busy database, waking up periodically to check for a free database, before giving up.
sqlite3_busy_timeout(sqlite3*, int ms);