Hello,
I’d been running Sonarr for quite sometime, but in the past month or so it has become ridiculously crashy. The webUI becomes completey unresponsive until I am able to restart the service. The two most predominant errors are System.OutOfMemoryException errors and disk I/O errors. I will post an example of each type of error at the end of the post.
As an experiment, I tried wiping out the Sonarr configuration files stored in ProgramData and installing fresh. When Sonarr is installed fresh and left unconfigured and dormant, no errors occur. Only after setting it up for my system and adding ~20 shows to monitor does it start to crash.
I’ll happily answer any other questions about my system configuration if it will help you diagnose the issue. Here are some samples of the crashes, as promised:
System.Threading.Tasks.TaskSchedulerException: An exception was thrown by a TaskScheduler. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Threading.Thread.StartInternal(IPrincipal principal, StackCrawlMark& stackMark)
at System.Threading.Thread.Start(StackCrawlMark& stackMark)
at System.Threading.Thread.Start(Object parameter)
at System.Threading.Tasks.ThreadPoolTaskScheduler.QueueTask(Task task)
at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)
at System.Threading.Tasks.Task.InternalStartNew(Task creatingTask, Delegate action, Object state, CancellationToken cancellationToken, TaskScheduler scheduler, TaskCreationOptions options, InternalTaskOptions internalOptions, StackCrawlMark& stackMark)
at System.Threading.Tasks.TaskFactory.StartNew(Action action)
at NzbDrone.Core.Indexers.FetchAndParseRssService.Fetch() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\FetchAndParseRssService.cs:line 47
at NzbDrone.Core.Indexers.RssSyncService.Sync() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\RssSyncService.cs:line 47
at NzbDrone.Core.Indexers.RssSyncService.Execute(RssSyncCommand message) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\RssSyncService.cs:line 65
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand](Command command) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 137
at NzbDrone.Core.Messaging.Commands.CommandExecutor.PublishCommand[TCommand](TCommand command) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 48
at CallSite.Target(Closure , CallSite , CommandExecutor , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at CallSite.Target(Closure , CallSite , CommandExecutor , Object )
at NzbDrone.Core.Messaging.Commands.CommandExecutor.PublishCommand(String commandTypeName, Nullable`1 lastExecutionTime) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 61
at NzbDrone.Core.Jobs.Scheduler.ExecuteCommands() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Jobs\Scheduler.cs:line 46
System.Data.SQLite.SQLiteException (0x80004005): disk I/O error
disk I/O error
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
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 System.Data.SQLite.SQLiteConnection.Open()
at Marr.Data.DataMapper.OpenConnection()
at Marr.Data.QGen.UpdateQueryBuilder`1.Execute()
at NzbDrone.Core.Datastore.BasicRepository`1.SetFields(TModel model, Expression`1[] properties) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 239
at NzbDrone.Core.Jobs.ScheduledTaskRepository.SetLastExecutionTime(Int32 id, DateTime executionTime) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Jobs\JobRepository.cs:line 37
at NzbDrone.Core.Jobs.TaskManager.Handle(CommandExecutedEvent message) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Jobs\TaskManager.cs:line 116
at NzbDrone.Core.Messaging.Events.EventAggregator.PublishEvent[TEvent](TEvent event) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Events\EventAggregator.cs:line 56
Which version of Sonarr?
Which version of Windows?
How many indexers do you have enabled?
Is .net 4.5 installed?
Thanks for the quick response!
Sonarr version is 2.0.0.2663, according to the log file
System is Windows 7 64-bit
2 indexers enabled - nzbs.org and lolo.sickbeard.com
.Net 4.5.1 is installed
Also, I checked out the logs again, and they seem to indicate just before crashing that Sonarr had sent a download to my downloader (in this case, SABnzbd), but started freaking out when it couldn’t find the file SAB was supposed to have downloaded. This eventually results in an OutOfMemoryException, which is followed by more ImportDecisionMaker errors like the one shown just below (that I didn’t leave in this log dump), ending in the disk I/O error showed near the end of the log.
The kicker is, the TV show that Sonarr had sent to SAB which seemed to cause this crash is reported by SAB to have downloaded just fine. It shows it was unpacked and dumped into the directory that Sonarr watches for new TV downloads. However, after Sonarr crashed I could not find the episode anywhere, either in the download directory or in the folder where downloaded episodes are renamed and moved.
15-1-20 21:25:39.5|Info|RssSyncService|Starting RSS Sync
15-1-20 21:25:09.2|Error|ImportDecisionMaker|Couldn't import file. D:\Downloads\complete\TV\Removed
System.IO.FileNotFoundException: File doesn't exist: D:\Downloads\complete\TV\Removed
at NzbDrone.Common.Disk.DiskProviderBase.GetFileSize(String path) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 139
at NzbDrone.Core.MediaFiles.EpisodeImport.ImportDecisionMaker.<GetDecisions>d__0.MoveNext() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportDecisionMaker.cs:line 74
15-1-20 21:25:39.6|Error|Scheduler|Error occurred while executing task NzbDrone.Core.Indexers.RssSyncCommand
System.Threading.Tasks.TaskSchedulerException: An exception was thrown by a TaskScheduler. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Threading.Thread.StartInternal(IPrincipal principal, StackCrawlMark& stackMark)
at System.Threading.Thread.Start(StackCrawlMark& stackMark)
at System.Threading.Thread.Start(Object parameter)
at System.Threading.Tasks.ThreadPoolTaskScheduler.QueueTask(Task task)
at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)
at System.Threading.Tasks.Task.InternalStartNew(Task creatingTask, Delegate action, Object state, CancellationToken cancellationToken, TaskScheduler scheduler, TaskCreationOptions options, InternalTaskOptions internalOptions, StackCrawlMark& stackMark)
at System.Threading.Tasks.TaskFactory.StartNew(Action action)
at NzbDrone.Core.Indexers.FetchAndParseRssService.Fetch() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\FetchAndParseRssService.cs:line 47
at NzbDrone.Core.Indexers.RssSyncService.Sync() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\RssSyncService.cs:line 47
at NzbDrone.Core.Indexers.RssSyncService.Execute(RssSyncCommand message) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\RssSyncService.cs:line 65
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand](Command command) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 137
at NzbDrone.Core.Messaging.Commands.CommandExecutor.PublishCommand[TCommand](TCommand command) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 48
at CallSite.Target(Closure , CallSite , CommandExecutor , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at CallSite.Target(Closure , CallSite , CommandExecutor , Object )
at NzbDrone.Core.Messaging.Commands.CommandExecutor.PublishCommand(String commandTypeName, Nullable`1 lastExecutionTime) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:line 61
at NzbDrone.Core.Jobs.Scheduler.ExecuteCommands() in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Jobs\Scheduler.cs:line 46
15-1-20 21:34:12.6|Error|EventAggregator|TaskManager failed while processing [CommandExecutedEvent]
System.Data.SQLite.SQLiteException (0x80004005): disk I/O error
disk I/O error
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
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 System.Data.SQLite.SQLiteConnection.Open()
at Marr.Data.DataMapper.OpenConnection()
at Marr.Data.QGen.UpdateQueryBuilder`1.Execute()
at NzbDrone.Core.Datastore.BasicRepository`1.SetFields(TModel model, Expression`1[] properties) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 239
at NzbDrone.Core.Jobs.ScheduledTaskRepository.SetLastExecutionTime(Int32 id, DateTime executionTime) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Jobs\JobRepository.cs:line 37
at NzbDrone.Core.Jobs.TaskManager.Handle(CommandExecutedEvent message) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Jobs\TaskManager.cs:line 116
at NzbDrone.Core.Messaging.Events.EventAggregator.PublishEvent[TEvent](TEvent event) in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Messaging\Events\EventAggregator.cs:line 56
Im having a similar issue with the same error messages. Its getting so bad I am looking at scheduling it to restart daily just to maintain stability. Just let me know which details you need to help with this case.