Page 1 of 1

SQL Command Failed, see log

Posted: July 26th, 2016, 6:16 pm
by xeddog
I have had SAB running on my computer for months, and have been running V1 for weeks. But for only the last 3 or 4 days I have been getting these errors. I haven't made any config changes, or any other system changes for months, other than normal updates to the OS. I have no other major system issues that I am aware of and everything else runs ok. SAB has been up for a while today, and the only thing I was doing when this happened was deleting an entry from the history display. Here is what I see in the log file:

Code: Select all

2016-07-26 15:42:44,426::ERROR::[database:137] SQL Command Failed, see log
2016-07-26 15:42:44,426::INFO::[database:139] Traceback: 
Traceback (most recent call last):
  File "/home/twoblues/SAB/SABnzbd-1.0.3/sabnzbd/database.py", line 115, in execute
    self.c.execute(command, args)
OperationalError: database is locked
2016-07-26 15:42:46,426::ERROR::[database:137] SQL Command Failed, see log
2016-07-26 15:42:47,207::INFO::[database:139] Traceback: 
Traceback (most recent call last):
  File "/home/twoblues/SAB/SABnzbd-1.0.3/sabnzbd/database.py", line 115, in execute
    self.c.execute(command, args)
OperationalError: database is locked
2016-07-26 15:42:48,424::ERROR::[database:137] SQL Command Failed, see log
2016-07-26 15:42:48,424::INFO::[database:139] Traceback: 
Traceback (most recent call last):
  File "/home/twoblues/SAB/SABnzbd-1.0.3/sabnzbd/database.py", line 115, in execute
    self.c.execute(command, args)
OperationalError: database is locked
2016-07-26 15:42:50,425::ERROR::[database:137] SQL Command Failed, see log
2016-07-26 15:42:50,822::INFO::[database:139] Traceback: 
Traceback (most recent call last):
  File "/home/twoblues/SAB/SABnzbd-1.0.3/sabnzbd/database.py", line 115, in execute
    self.c.execute(command, args)
OperationalError: database is locked
2016-07-26 15:50:53,091::ERROR::[database:137] SQL Command Failed, see log
2016-07-26 15:50:53,091::INFO::[database:139] Traceback: 
Traceback (most recent call last):
  File "/home/twoblues/SAB/SABnzbd-1.0.3/sabnzbd/database.py", line 115, in execute
    self.c.execute(command, args)
OperationalError: database is locked
2016-07-26 15:50:55,088::ERROR::[database:137] SQL Command Failed, see log
2016-07-26 15:50:55,088::INFO::[database:139] Traceback: 
Traceback (most recent call last):
  File "/home/twoblues/SAB/SABnzbd-1.0.3/sabnzbd/database.py", line 115, in execute
    self.c.execute(command, args)
OperationalError: database is locked
I haven't seen much doing a search, but there were a couple of threads from 2013 which seems a little old now. Besides, they weren't any help.

Oh. Almost forgot. I have both version 0.7 and 1.0 installed onto my computer, but only V1 running. V0.7 was installed using the standard Ubuntu repositories while, 1.0 was installed via PPA.

Any help would be apprecated.

Thanks,

Wayne

System is Ubuntu Linux 16.04 with current updates as of this morning.
16GB RAM
Intel I-7 processor at 3.5GHz
nVidia GT 730 graphics card.
1 TB esata disk for / filesystem
1 TB esata disk for /home filesystem
SAB Version: 1.0.3 [927ba3c]

Re: SQL Command Failed, see log

Posted: July 27th, 2016, 2:10 am
by shypike
Possibly bugs in the SQL library, but we can never exclude SABnzbd itself.
Some reports have reached us, but it is a very rare error.
One blunt way to deal with it is to stop SABnzbd, remove history1.db and restart.
This will remove your complete history., which is (since 1.0.0) also the basis
for duplicate detection.

We will probably add some code to create more extensive diagnostics when this error occurs.

Re: SQL Command Failed, see log

Posted: July 27th, 2016, 4:59 pm
by xeddog
This is a hit-and-miss error and doesn't happen TOO often. Since I posted this I have deleted a few items (maybe a half dozen) from SAB history without error. history1.db currently only has 5 entries in it, and three of those were manual downloads, so maybe I'll just let it go for now.


Thanks,

Wayne

Re: SQL Command Failed, see log

Posted: July 28th, 2016, 2:09 am
by shypike
We're still convinced it's a bug in the sqlite library (which we cannot fix),
because only specific systems show this behaviour.
But we think we can work around the problem.
Likely that will go into the 1.1.0 release.