Open timronan opened 5 years ago
It seems like this database locking is associated with multiple open transactions that are all trying to write or read from the database at the same time. The busy timeout has been increased to 120 seconds. The busy timeout allows incoming SQL transactions to sleep while another transaction is interfacing with the database, the maximum amount of time that the transaction can sleep is set in seconds by the integer value above Busy Timeout.
A connection.commit() command also been added after the DELETE FROM
statements. Committing the Delete FROM
statements to the database should allow the database to unlock and be ready for another transaction commit .
The request.txt, above, has been run through this modified code with no locking database exceptions.
An instance of
rover retrieve request.txt
, attached to this issue, run on Python 3.6 has lead to a critical errorsqlite3.OperationalError: data base is locked
. The rover retrieve.log shows two stack traces that are leading to thedata base is locked
error.Please note that both database is locked operations originate from a
DELETE FROM
sql command. request.txt