Page 1 of 1

SQL error database locked

Posted: February 15th, 2013, 5:54 am
by shpapy
hi, since this morning i get the following error
OperationalError: database is locked
2013-02-15 10:46:16,767::ERROR::[database:90] SQL Command Failed, see log
2013-02-15 10:46:16,767::DEBUG::[database:91] SQL: SELECT * FROM history WHERE name LIKE ? ORDER BY completed desc LIMIT ?, ?
2013-02-15 10:46:16,767::INFO::[database:92] Traceback:
Traceback (most recent call last):
File "/usr/share/sabnzbdplus/sabnzbd/database.py", line 83, in execute
self.c.execute(command, args)
OperationalError: database is locked

i checked in the forums but couldn't find something.
i restarted sab still the same result; everything works fine. d/l ; queue all is good besides this error i cannot reboot the machine atm.

Re: SQL error database locked

Posted: February 15th, 2013, 9:28 am
by sander
FWIW:

I sometimes see the same thing on my Ubuntu. It doesn't seem to be a real problem (exactly as you say), so I ignore it.

Re: SQL error database locked

Posted: February 15th, 2013, 10:31 am
by shypike
This is an inherent thing from the sqlite library.
Their docs and forums claim that the only way an sqlite database file is locked, is when a program has it open.
I've also seen claims by users that a reboot doesn't remedy this, making the previous line doubtful.

Maybe this will help: http://stackoverflow.com/questions/1510 ... e-database
More extensive discussion on the sqlite forum: http://sqlite.1065341.n5.nabble.com/Unl ... 21053.html
We haven't really looked into that, because the issue is so rare.

As a last resort you can try to delete the file admin/history1.db