WebUI will not load or loads very slowly after Sonarr has been running for a while

Sonarr version (exact version): 2.0.0.5163
Mono version (if Sonarr is not running on Windows):
mono -V
Mono JIT compiler version 5.0.0 (Stable 5.0.0.100/9667aa6 Wed Jul 12 17:00:30 UTC 2017)
Copyright © 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
OS:
I’m using a docker container. Tried both linuxserver/sonarr and binhex/arch-sonarr.

Host is Ubuntu 16
Debug logs:
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here. Post in .txt not .doc, .rtf or some other formatted document)
Description of issue:

I have been having issues using sonarr via docker.
I’m currently using binhex/arch-sonarr but I was using linuxserver/sonarr before that with the same issues.

After about 5-10 minutes of sonarr running the webui either doesn’t load at all or loads really slow.

If I try and restart the docker container it hangs for hours before the mono process in container stops. Even when killed.

I end up having to restart my host server and then the issues repeats.

Link to all sonar logs. Regular, Debug, Trace…
https://mega.nz/#!ltYChZ7C!twVL60IsN8RgBOFSbndnmX4XL0ulOosUKTvLF5tHC6I

Anyone know what could be causing this?
I’m almost 2 weeks behind on my tv shows because they import so slowly.

It’s been 29 days…Bump.

The log is littered with errors. But what stands out the most is sections like this:

18-4-10 23:30:03.2|Debug|ExistingExtraFileService|Looking for existing extra files in /tv/CBS Evening News
18-4-10 23:30:03.2|Trace|TorznabRssParser|Parsed: Teen Mom Young and Pregnant S01E05 1080p WEB X264-Tbs
18-4-10 23:30:03.2|Debug|DiskScanService|Scanning '/tv/CBS Evening News' for non-video files
18-4-10 23:58:28.9|Trace|ConfigService|Using default config value for 'filedate' defaultValue:'None'
18-4-10 23:58:28.9|Trace|ConfigService|Using default config value for 'filechmod' defaultValue:'0644'
18-4-10 23:58:28.9|Trace|ConfigService|Using default config value for 'setpermissionslinux' defaultValue:'False'
18-4-10 23:30:03.2|Debug|TorznabRssParser|Failed to parse Url https://beyond-hd.me//details.php?id=73460&hit=1, ignoring.

and

18-4-11 00:58:27.8|Debug|Api|[GET] /api/health: 200.OK (2 ms)
18-4-11 00:58:27.8|Debug|Parser|Release Group parsed: MTV
18-4-11 01:39:06.0|Trace|ConfigService|Using default config value for 'filedate' defaultValue:'None'
18-4-11 00:58:27.8|Debug|ParsingService|No matching series Shadowhunters
18-4-11 01:39:06.0|Debug|EpisodeService|Linking [Season 02/Cyberwar - S02E02 - 2017-10-10 - Who Hacked the DNC WEB-DL-1080p.mkv] > [[16547]Who Hacked the DNC]
18-4-11 01:39:06.0|Trace|ConfigService|Using default config value for 'filechmod' defaultValue:'0644'

Either time jumped ahead over 30 minutes, or it locked up.
The pattern repeats.

Search the log for ‘CommandExecutor’ and see how long certain commands take.

Take this little gem:

18-4-11 00:32:06.6|Trace|CommandExecutor|DownloadedEpisodesScanCommand -> DownloadedEpisodesCommandService
18-4-11 00:32:06.6|Trace|CommandQueueManager|Marking command as started: DownloadedEpisodesScan
18-4-11 00:57:50.6|Trace|ConfigService|Using default config value for 'downloadedepisodesfolder' defaultValue:''
18-4-11 00:57:50.6|Trace|ConfigService|Using default config value for 'filedate' defaultValue:'None'
18-4-11 00:57:50.6|Debug|ImportDecisionMaker|Analyzing 18/167 files.
18-4-11 00:57:50.6|Trace|DownloadedEpisodesCommandService|Drone Factory folder is not configured

Between the first log line, and the last is virtually nothing, yet it takes like 25 minutes.
Just a check to see if it’s configured, which is a database hit.
(DownloadedEpisodesScanCommand shouldn’t even be scheduled, but that’s probably coz you didn’t set the interval to 0.)

Either way, my guess is that there’s something wrong with your IO, particularly the sqlite database. But it could be a number of related things.

Your mention of “I end up having to restart my host server and then the issues repeats.” kinda support that theory.

Thanks you @Taloth for taking the time to help me out.

So last night I restarted host server then quickly check the drone factory interval.

It was set to 1. I set it to 0 and saved Then let it run for the night.

Does DownloadedEpisodesScanCommand in the log refer to that setting? If not where should I go to disable that?

As for IO… My Tv dir is an Rclone cache mount where the cache data is stored on my NAS. Access via a nfs mount. I have a 2Gbit via LACP Link aggregation.

I’m sure that slows things down a bit but I only have this problem with Sonarr. Radarr and Lidarr is just fine.

I think I may have just borked a setting in sonarr. But just in case is there a way to troubleshoot IO on my server?

Is this entry in the log normal…
DiskScanService

I noticed Sonarr keeps scanning my TV shows. I don’t remember it doing that before…At least not constantly scanning dirs.

Does DownloadedEpisodesScanCommand in the log refer to that setting? If not where should I go to disable that?

Yes it does, so setting it to 0 was correct. Although it’s not the cause of your problems. All the Command does is query the db and discover there’s not a directory it needs to scan, and quits.

As for IO… My Tv dir is an Rclone cache mount where the cache data is stored on my NAS. Access via a nfs mount. I have a 2Gbit via LACP Link aggregation.

I wouldn’t expect that to be a problem. It’d only make scanning the series directory slower, but not 30 min slower. (but it doesn’t hurt to check your syslog for errors related to it)

I think I may have just borked a setting in sonarr. But just in case is there a way to troubleshoot IO on my server?

Sonarr should hit it’s own database almost every minute. Use linux cmdline tools to check when IO happens on the nzbdrone.db and .db-wal files, check that against the 30min jumps in the log files.

You could also consider adding a netdata container https://my-netdata.io/ to monitor the system. It gives you some graphs that could provide clues.
But I cannot analyse it for you, it’ll simply take too much time for me.

Is this entry in the log normal…
DiskScanService
I noticed Sonarr keeps scanning my TV shows. I don’t remember it doing that before…At least not constantly scanning dirs.

It appears to be finishing individual series scans in seconds, so that’s normal. It does a scan every 12h, so if the 30min freeze happens every few minutes then it’s no surprise it’s constantly doing it.

You were right with the IO. All my docker config mounts were on a 1TB HDD. Turns out it might be getting ready to die.

Temporally moved all docker data to nvme ssd and everything is working fine now.

I guess it caused more problems with sonarr vs radarr/lidarr since I have more media for TV so more to scan.

Thanks @Taloth

Awesome, glad to help.

My own desktop storage has been causing issues too, 300ms+ response times occasionally. It’s an raid5 disk array, almost 10 y old drives, so it was expected.

1 Like

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