Unable to open Database file


#1

Describe the bug
Been testing out phantom and yall are doing wonderful things. Only issue i have found is randomly every 48 or so hours it loses its ability to read/write to/from the db. A restart resolves this. This stops all actions obviously. UI dies as a white page and api is unresponsive.

Logs

18-12-1 19:26:15.5|Info|RssSyncService|RSS Sync Completed. Reports found: 50, Reports grabbed: 0
18-12-1 19:40:23.7|Error|SonarrErrorPipeline|[GET /api/v3/episodeFile]

[v3.0.0.334] System.Data.SQLite.SQLiteException (0x80004005): unable to open database file
unable to open database file
  at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, System.UInt32 timeoutMS, System.String& strRemain) [0x0033c] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x000f6] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at System.Data.SQLite.SQLiteCommand.GetStatement (System.Int32 index) [0x00008] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteCommand.GetStatement(int)
  at System.Data.SQLite.SQLiteDataReader.NextResult () [0x0011e] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at System.Data.SQLite.SQLiteDataReader..ctor (System.Data.SQLite.SQLiteCommand cmd, System.Data.CommandBehavior behave) [0x00090] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader..ctor(System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior)
  at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x0000c] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery (System.Data.CommandBehavior behavior) [0x00006] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery () [0x00006] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at System.Data.SQLite.SQLiteConnection.Open () [0x00959] in <61a20cde294d4a3eb43b9d9f6284613b>:0 
  at Marr.Data.DataMapper.OpenConnection () [0x00019] in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:847 
  at Marr.Data.DataMapper.Query[T] (System.String sql, System.Collections.Generic.ICollection`1[T] entityList, System.Boolean useAltName) [0x00065] in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\DataMapper.cs:566 
  at Marr.Data.QGen.QueryBuilder`1[T].ToList () [0x00052] in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\QueryBuilder.cs:279 
  at Marr.Data.QGen.SortBuilder`1[T].ToList () [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\SortBuilder.cs:176 
  at Marr.Data.QGen.SortBuilder`1[T].GetEnumerator () [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\SortBuilder.cs:247 
  at System.Linq.Enumerable.SingleOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003a] in <9a2f23a52d30476eafb596a55ecb4b63>:0 
  at NzbDrone.Core.Datastore.BasicRepository`1[TModel].Get (System.Int32 id) [0x0000d] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\BasicRepository.cs:70 
  at NzbDrone.Core.Tv.SeriesService.GetSeries (System.Int32 seriesId) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Tv\SeriesService.cs:57 
  at Sonarr.Api.V3.EpisodeFiles.EpisodeFileModule.GetEpisodeFiles () [0x00456] in M:\BuildAgent\work\63739567f01dbcc2\src\Sonarr.Api.V3\EpisodeFiles\EpisodeFileModule.cs:72 
  at Sonarr.Http.REST.RestModule`1[TResource].<set_GetResourceAll>b__33_0 (System.Object options) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\Sonarr.Http\REST\RestModule.cs:121 
  at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <bb3027f50b35411088f45475912cc2ff>:0 

System Information

  • Sonarr Version: 3.0.0.334
  • Operating System: Ubuntu 18.04.1
  • .net Framework (Windows) or mono (macOS/Linux) Version: 5.16.0.179

Additional context
i cant attribute it to any specific action or time frame other than its not daily but every 2-3 days at random. if you need more logs i can pastebin them, but there is no surrounding info that looked relevant. Business as usual then hard stop.


#2

Trace logs would be helpful as they show more info on what Sonarr is doing, but I’d also recommend downgrading mono as 5.16 has been very problematic.

Also, what filesystem is the DB stored on?


Mono Version For Latest Sonarr
#3

The entire VMDK is on Iscsi ssd storage but I’m hesitant to think that’s it as the entire os would freeze up!

I will turn on trace. Forgot about that sorry. Do you have a sonarrv3 preferred mono version?


#4

I’ve been using 5.12 for months without issue, I’d go for that.

Which file system though, ext, btrfs, etc? I be curious if you saw the same with a VMDK stored on a local disk, but I wouldn’t expect iscsi to fail that spectacularly.


Mono Version For Latest Sonarr