I\'m trying this code:
import sqlite
connection = sqlite.connect(\'cache.db\')
cur = connection.cursor()
cur.execute(\'\'\'create table item
(id integer p
Even when I just had one writer and one reader, my issue was that one of the reads was taking too long: longer than the stipulated timeout of 5 seconds. So the writer timed out and caused the error.
So, be careful when reading all entries from a database especially from one which the size of the table grows over time.