Database is locked #26

Closed
opened 2022-07-08 22:27:49 +00:00 by Miroslavsckaya · 2 comments

Find out why the database is locked and solve this


File "/home/mitsuha_s/tg_rss_bot/database.py", line 136, in update_feed_items
    self.cur.execute('DELETE FROM feeds_last_items WHERE feed_id = ?', [feed_id])
sqlite3.OperationalError: database is locked
Find out why the database is locked and solve this ``` File "/home/mitsuha_s/tg_rss_bot/database.py", line 136, in update_feed_items self.cur.execute('DELETE FROM feeds_last_items WHERE feed_id = ?', [feed_id]) sqlite3.OperationalError: database is locked ```
Miroslavsckaya added the
bug
label 2022-07-08 22:28:58 +00:00
Collaborator

Check this out and think if we need global thread lock:
https://gist.github.com/rianhunter/10bfcff17c18d112de16?permalink_comment_id=3122052#gistcomment-3122052

Also this could probably be caused by two scripts running with the same database open simultaneously:
https://docs.pyrogram.org/faq/sqlite3-operationalerror-database-is-locked

Check this out and think if we need global thread lock: https://gist.github.com/rianhunter/10bfcff17c18d112de16?permalink_comment_id=3122052#gistcomment-3122052 Also this could probably be caused by two scripts running with the same database open simultaneously: https://docs.pyrogram.org/faq/sqlite3-operationalerror-database-is-locked
Miroslavsckaya self-assigned this 2022-07-08 22:29:36 +00:00
Miroslavsckaya added this to the RSS Bot Kanban Perdoling project 2022-07-08 22:32:23 +00:00
Author
Owner

Closed in favor of #15. PostgreSQL is much more compatible with multiple simultaneous clients.

Closed in favor of #15. PostgreSQL is much more compatible with multiple simultaneous clients.
Miroslavsckaya added the
wontfix
label 2022-07-09 13:36:00 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Miroslavsckaya/tg_rss_bot#26
No description provided.