Database malformd

Hi, I have issues with NZBDrone for months now. I am never able to revert to one of the backups, so i have to redo everything once in a while.

I don’t know why this happens, but it does look very random… Sometimes it just works for a couple of weeks, and sometimes just for a few days.

Anyone got tips for this? And how to restore?

[v2.0.0.4146] System.Data.SQLite.SQLiteException: database disk image is malformed
database disk image is malformed
  at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, UInt32 timeoutMS, System.String& strRemain) <0x429f798 + 0x00ac3> in <filename unknown>:0 
  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () <0x429f438 + 0x001a8> in <filename unknown>:0 

sonar16-6-12 14:10:08.6|Info|Bootstrap|Starting Sonarr - /opt/homebrew-cask/Caskroom/sonarr/latest/Sonarr.app/Contents/MacOS/NzbDrone.exe - Version 2.0.0.4146
16-6-12 14:10:13.8|Info|MigrationLogger|*** Migrating data source=/Volumes/HDD/users/xvilo/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Truncate;pooling=True;version=3;Full FSync=True ***
16-6-12 14:10:14.1|Info|MigrationLogger|*** Migrating data source=/Volumes/HDD/users/xvilo/.config/NzbDrone/logs.db;cache size=-10485760;datetimekind=Utc;journal mode=Truncate;pooling=True;version=3;Full FSync=True ***
16-6-12 14:10:14.1|Fatal|ConsoleApp|EPIC FAIL!

[v2.0.0.4146] System.Data.SQLite.SQLiteException: database disk image is malformed
database disk image is malformed
  at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, UInt32 timeoutMS, System.String& strRemain) <0x4353798 + 0x00ac3> in <filename unknown>:0 
  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () <0x4353438 + 0x001a8> in <filename unknown>:0 

Based on that log it’s probably only the logs.db that’s corrupt, I assume you’re on OSX. (It would’ve been nice if you actually added the information that is requested when creating a new topic, there is a reason why we ask for it)

gehehe, probably missed that part about the info.
Yeah, i am running it on OS X, i’ll try to just delete the logs.db file?

It was in the contents of the post when you went to create it, you would have had to delete it all.

Yup, that will do it.

Well it happens a lot the past few months, so idk why this is happening, but if others suffer from this too it should be investigated i suppose… Its a bit sh*t, the application won’t start because of a broken logs.db

But deleting logs.db fixed it!

It’s related to power outages and Apple’s horrible implementation of the ‘fsync’/FLUSH function, meant to ensure that data is committed to disk and not hanging around in some write cache, during power outages the filesystem gets into an inconsistent state.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.