SQL Command Failed

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
Taomyn
Full Member
Full Member
Posts: 127
Joined: August 25th, 2008, 3:29 am

SQL Command Failed

Post by Taomyn »

Hi,

I keep getting these errors appearing in the log and I cannot see why:

Code: Select all

2015-03-25 15:04:07,157::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:16,503::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:20,834::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:21,928::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:22,217::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:23,374::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:26,374::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:27,660::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:28,227::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:31,917::ERROR::[database:111] SQL Command Failed, see log
2015-03-25 15:04:33,089::ERROR::[database:111] SQL Command Failed, see log
I've enabled "+debug" in the GUI but I cannot see any extra information. Where is the "log" it mentions as I cannot see anything in sabnzbd.log or cherrypy.log that helps shed any light.

Cheers,
Fernando
User avatar
sander
Release Testers
Release Testers
Posts: 8830
Joined: January 22nd, 2008, 2:22 pm

Re: SQL Command Failed

Post by sander »

I checked line 111 of sabnzbd/database.py and it says:

Code: Select all

            logging.error(Ta('SQL Command Failed, see log'))
            logging.debug("SQL: %s" , command)
            logging.info("Traceback: ", exc_info = True)
So I would really expect something with "SQL" in your sabnzbd.log (if set to +Debug)

The underlying root cause of the error message is typically corrupt or unwritable *.sab / *.db files.
User avatar
Taomyn
Full Member
Full Member
Posts: 127
Joined: August 25th, 2008, 3:29 am

Re: SQL Command Failed

Post by Taomyn »

Ok, so the only .db/.sab file that as not 1KB was history1.db, so I shut down the service, removed the file and restarted the service. It's generated a new copy so I'll see how it goes.

Is there any way to use another database, such as MySQL or MariaDB?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SQL Command Failed

Post by shypike »

Taomyn wrote:Ok, so the only .db/.sab file that as not 1KB was history1.db, so I shut down the service, removed the file and restarted the service. It's generated a new copy so I'll see how it goes.
Is there any way to use another database, such as MySQL or MariaDB?
As far as I know, only sqlite has an easy interface to Python.
Replacing it with another one is no easy task, while MySQL and MariaDB are also huge overkill for SABnzbd's very modest needs.
Problem reports like like yours are very rare indeed.
Mostly it's just a question of a small corruption and removal of the database solves the issue.
However, I suspect that your issue runs a bit deeper.
Can you tell me which operating system you are using?
And how did you install SABnzbd and its dependencies?
User avatar
Taomyn
Full Member
Full Member
Posts: 127
Joined: August 25th, 2008, 3:29 am

Re: SQL Command Failed

Post by Taomyn »

shypike wrote:As far as I know, only sqlite has an easy interface to Python.
Replacing it with another one is no easy task, while MySQL and MariaDB are also huge overkill for SABnzbd's very modest needs.
Fair enough, I just happen to have a small instance of MariaDB running on my server (for phpBB, TeamSpeak and my mail server) and was wondering if I could use it instead if the problem came back. Nice to know it's SQLite though as I have another service for temperature monitoring that also uses it and along with an ODBC connector I can monitor data within its database more comprehensively than the software I received with it. Anyway, that's off-topic.
shypike wrote:Problem reports like like yours are very rare indeed.
Mostly it's just a question of a small corruption and removal of the database solves the issue.
However, I suspect that your issue runs a bit deeper.
Can you tell me which operating system you are using?
I'm running on Windows Server 2012 R2
shypike wrote:And how did you install SABnzbd and its dependencies?
I just use the standard Windows installer - I make sure to stop the services before an upgrade, back-up the folder just in case, then apply each new version.

Cheers,
Taomyn
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SQL Command Failed

Post by shypike »

Taomyn wrote:I'm running on Windows Server 2012 R2
I just use the standard Windows installer - I make sure to stop the services before an upgrade, back-up the folder just in case, then apply each new version.
Too bad, I don't have an VMWare Image for Server 2012.
(Technet is gone and MSDN is just too expensive.)
Do you run a virus scanner?

SQLite support is in the form of the sqlite3.dll file, distributed by the SQLite site.
https://www.sqlite.org/download.html
You can try to replace it with a more recent version, it's a separate file within SABnzbd's program folder.
They should be interchangeable.
User avatar
Taomyn
Full Member
Full Member
Posts: 127
Joined: August 25th, 2008, 3:29 am

Re: SQL Command Failed

Post by Taomyn »

shypike wrote: Too bad, I don't have an VMWare Image for Server 2012.
(Technet is gone and MSDN is just too expensive.)
If you're using VMWare you can always use the 180day eval versions of Windows
shypike wrote:Do you run a virus scanner?
Yes and I have a couple of the download data folders excluded to prevent issues
shypike wrote:SQLite support is in the form of the sqlite3.dll file, distributed by the SQLite site.
https://www.sqlite.org/download.html
You can try to replace it with a more recent version, it's a separate file within SABnzbd's program folder.
They should be interchangeable.
Ok, thanks, that's another idea to try should the problem return.
Post Reply