Error: database disk image is malformed

Sonarr 3.0.0.348
Windows 10
Error: Error occurred while executing task MessagingCleanup: database disk image is malformed
database disk image is malformed

Although I’m on V3, If i roll back to a v2 backup the error is still present. I have 30 days worth of backups but the error is present in all of them unfortunately, so no restore I can do.

Sonarr appears to be working ok, but I was trying to clear the error.

Here it is in full:

System.Data.SQLite.SQLiteException (0x80004005): database disk image is malformed
database disk image is malformed
   at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
   at Marr.Data.DataMapper.Delete[T](String tableName, Expression`1 filter) in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:line 802
   at Marr.Data.DataMapper.Delete[T](Expression`1 filter) in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:line 777
   at NzbDrone.Core.Datastore.BasicRepository`1.Delete(Expression`1 filter) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 55
   at NzbDrone.Core.Messaging.Commands.CommandRepository.Trim() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandRepository.cs:line 35
   at NzbDrone.Core.Messaging.Commands.CommandQueueManager.CleanCommands() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:line 215
   at NzbDrone.Core.Messaging.Commands.CleanupCommandMessagingService.Execute(MessagingCleanupCommand message) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CleanupCommandMessagingService.cs:line 14
   at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand](TCommand command, CommandModel commandModel) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 95
   at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at CallSite.Target(Closure , CallSite , CommandExecutor , Object , CommandModel )
   at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommands() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 41

Does anyone know how to repair the DB? is there a command line I can run etc?

It’s a sqlite DB.

Thanks for the link. Tried the suggestions but it was dead. So rebuilt it manually via a new install :frowning:

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