Getting "System.OutOfMemoryException"

Sonarr version (exact version): 3.0.8.1507
Mono version (if Sonarr is not running on Windows): Windows
OS: Windows 10
Debug logs:
Debug logs: https://www.toptal.com/developers/hastebin/udogozocer.sql
Trace logs: https://www.toptal.com/developers/hastebin/xitifuxiyo.rb
Normal logs: https://www.toptal.com/developers/hastebin/orefepulay.properties

022-06-10 09:34:49.7|Debug|PendingReleaseService|Removing failed releases from pending
2022-06-10 09:34:49.8|Debug|Api|[GET] /api/v3/command: 200.OK (18 ms)
2022-06-10 09:36:04.0|Debug|SabnzbdProxy|Url: http://127.0.0.1:9001/api?mode=queue&start=0&limit=0&apikey=(removed)&output=json
2022-06-10 09:36:04.1|Debug|SabnzbdProxy|Url: http://127.0.0.1:9001/api?mode=history&start=0&limit=60&category=tv&apikey=(removed)&output=json
2022-06-10 09:36:04.3|Debug|Api|[GET] /api/v3/command: 200.OK (32 ms)
2022-06-10 09:36:04.5|Debug|Api|[GET] /api/v3/command: 200.OK (18 ms)
2022-06-10 09:37:34.1|Debug|SabnzbdProxy|Url: http://127.0.0.1:9001/api?mode=queue&start=0&limit=0&apikey=(removed)&output=json
2022-06-10 09:37:34.2|Debug|SabnzbdProxy|Url: http://127.0.0.1:9001/api?mode=history&start=0&limit=60&category=tv&apikey=(removed)&output=json
2022-06-10 09:37:34.4|Debug|Api|[GET] /api/v3/command: 200.OK (33 ms)
2022-06-10 09:37:34.5|Debug|Api|[GET] /api/v3/command: 200.OK (18 ms)
2022-06-10 09:40:04.3|Error|GlobalExceptionHandlers|Task Error

[v3.0.8.1507] System.OutOfMemoryException: Exception of type ‘System.OutOfMemoryException’ was thrown.
at NzbDrone.Common.TPL.TaskExtensions.<>c.b__1_0(Task t)
at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

2022-06-10 09:40:04.3|Error|GlobalExceptionHandlers|Task Error

[v3.0.8.1507] code = IoErr (10), message = System.Data.SQLite.SQLiteException (0x800007FF): 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() in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:line 844
at Marr.Data.QGen.InsertQueryBuilder1.Execute() in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\InsertQueryBuilder.cs:line 138 at Marr.Data.DataMapper.Insert[T](T entity) in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:line 728 at NzbDrone.Core.Datastore.BasicRepository1.Insert(TModel model) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\BasicRepository.cs:line 114
at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Push[TCommand](TCommand command, CommandPriority priority, CommandTrigger trigger) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:line 126
at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Push(String commandName, Nullable`1 lastExecutionTime, CommandPriority priority, CommandTrigger trigger) in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:line 139
at NzbDrone.Core.Jobs.Scheduler.ExecuteCommands() in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Jobs\Scheduler.cs:line 42
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

Description of issue:
Every day or so, my Sonarr will force close at a random time. When I check the logs its getting a System.OutOfMemoryException error, followed by a bunch of System.Data.SQLite.SQLiteException (0x800007FF): disk I/O error’s.

I’ve tried uninstalling/reinstalling, running chkdsk on my ssd, and running a memtest - Can’t seem to spot what is causing this =. Any help appreciated!

Not a Sonarr issue.

Your system doesn’t have enough memory to do everything you’re asking it.

Your disk also appears to be failing; or perhaps it’s a side affect of the memory issue.

OutOfMemoryException doesn’t necessarily mean that the system is out of memory, but could be something like anti-virus blocking memory, that’s actually where we’ve seen it the most. It’d be worth disabling your AV temporarily to see if the problem is resolve then looking at a way to exclude it from monitoring the Sonarr process.

Thanks, will give this a shot. I saw from some other threads that bitdefender doesnt play nice, so have disabled it and see how it goes!

Looping back with results - added the sonarr.exe to the Bitdefender “Advanced Threat Defense” exception list. Have had it running for 7 days now, so I think its solved. Thanks markus101 and bakerboy448!

1 Like

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