Sonarr keeps stalling

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows): .NET Version: 6.0.13
OS: Debian 12
Debug logs:

Description of issue:
Every time sonarr (re)starts it will only scan for 3 TV shows and stop! I can restart it, it will scan for 3 new ones and agian, stop.
When looking at events, i can only see the last event, something like:

[NCIS: Los Angeles] was recently added, performing post-add actions

And that’s it, until next restart when new TV Show is scanned and added, and in the loop it goes.

When looking at the “Tasks” i can see 2-3 “Refresh Series” tasks runnning and “Process Monitored Downloads” running but that’s pretty much it.

Sonarr is running as proxmox container, I’ve tried manual installation inside container on Ubuntu 22 and also reinstalled using Proxmox Helper Scripts but the issue is the same.

TV Shows are mounted on /tvshows directory as NFS share, all permissions are active, sonarr user has access to create folders, files, rename folders and files - pretty much all permissions (I’ve tested it)

I have no idea what to do, any help would be greatly appreciated.

Posting an update (and hoping someone will pickup and help)

I’ve set Settings → Media Management → “Rescan Series Folder after Refresh” to “After Manual Refresh” and I’ve refreshed 1 TV Show - 30 Rock.
It got stuck on “Refresh Series” task and that task is preventing for example app upgrade.
When i set that to “Never” it refreshes but never scans, so the tasks is completed successfully.

So for some reason, whenever scanning is in progress, task will get stuck on even 1 show.

Also, I’ve enabled trace logs and checked the logs after I’ve hit the manual refresh button for show. UI is showing “Scanning 30 Rock” but log is showing:

24-03-01 16:01:35.4|Info|DiskScanService|Completed scanning disk for 30 Rock

Also, task is stuck, never completes.
I’ve updated Sonarr to and it’s the same problem.

2024-02-25 23:41:30.2|Debug|ExistingMetadataImporter|Looking for existing metadata in /tvshows/NCIS Los Angeles
2024-02-25 23:41:30.2|Debug|Parser|Parsing string 'tvshow.nfo'
2024-02-25 23:41:30.2|Debug|Parser|Unable to parse tvshow.nfo
2024-02-25 23:41:30.2|Debug|Parser|Parsing string 'tvshow.nfo'
2024-02-25 23:41:30.2|Debug|Parser|Unable to parse tvshow.nfo
2024-02-25 23:41:30.2|Debug|Parser|Parsing string 'NCIS Los Angeles S09E07 The Silo.nfo'
2024-02-25 23:41:30.2|Trace|Parser|^(?<title>.+?)(?:(?:[-_\W](?<![()\[!]))+S?(?<season>(?<!\d+)(?:\d{1,2})(?!\d+))(?:[ex]|\W[ex]){1,2}(?<episode>\d{2,3}(?!\d+))(?:(?:\-|[ex]|\W[ex]|_){1,2}(?<episode>\d{2,3}(?!\d+)))*)(?:[-_. ]|$)(?!\\)
2024-02-25 23:41:30.2|Debug|Parser|Episode Parsed. NCIS Los Angeles - S09E07 
2024-02-25 23:41:30.2|Debug|Parser|Languages parsed: Unknown
2024-02-25 23:41:30.2|Debug|QualityParser|Trying to parse quality for 'NCIS Los Angeles S09E07 The Silo.nfo'
2024-02-25 23:41:30.2|Debug|Parser|Quality parsed: Unknown v1
2024-02-25 23:41:30.2|Debug|Parser|Release Group parsed: 

Sonarr starts looking for metadata files, finds one NFO for an episode and that process never completes.

I’m not able to reproduce any issues importing existing metadata files after the series is refreshed.

That’s because it’s still processing the extra files on disk, the stage is normally done within seconds, but for some reason with your setup (or the extra files) it gets hung up.

What do those NFO files contain?
If you temporarily remove those NFO files does it finish the refresh/rescan properly?

Thanks for replying back.

I believe those nfo files were originally created by kodi before I’ve used MySQL as a library, but i might’ve been mistaken. Anywhere, here is a preview of NCIS Los Angeles S09E07 The Silo.nfo:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <title>The Silo</title>
    <showtitle>NCIS: Los Angeles</showtitle>
    <plot>Kensi is transported to a missile launch facility to help thwart a takeover of nuclear weapons.</plot>

Let’s try to narrow it down since i can replicate this issue to a single TV Show that doesn’t contain any extra .nfo files. TV Show in question: 30 Rock (2006).
I’ve used linux ‘find’ to locate any nfo files and it found only ‘tvshow.nfo’ that is generated by sonarr:

root@sonarr:/var/lib/sonarr/logs# find /tvshows/30\ Rock\ \(2006\)\ Season\ 1-7\ S01-S07\ \(1080p\ AMZN\ WEBRip\ x265\ HEVC\ 10bit\ AAC\ 5.1\ Silence\)/ -iname '*.nfo'
/tvshows/30 Rock (2006) Season 1-7 S01-S07 (1080p AMZN WEBRip x265 HEVC 10bit AAC 5.1 Silence)/tvshow.nfo
  • I’ve removed the .nfo nonetheless.
  • I’ve set “Rescan Series Folder after Refresh” to “After Manual Refresh”
  • Stopped sonarr
  • Removed all logs
  • Started sonarr
  • Clicked on Refresh button for series 30 Rock
  • It got stuck in task “Refresh Series”, nothing (appears to be) useful in log files.

New log files here:

I mean sure, rescan does appear to be completed but back when it had more than 3 TV Shows to scan it gets stuck and never proceeds further.
I got all the TV Shows scanned only after many, many service restarts.

But the stuck task when it happens on a regular/scheduled trigger will cause other tasks to stall.

Some environment info beside what’s mentioned in original thread:

  • Sonarr is running as root (but originally tried to run it as same owner:group as where TV Shows are originally located)
  • TV Shows are mounted using NFS Share in fstab entry:
    <ip address>:/mnt/2TB/media/Serije /tvshows nfs nofail,x-systemd.automount,,x-systemd.device-timeout=10s
  • Original TV Shows owner:group is 1000:1001
  • Sonarr can create new files and folders in /tvshows

Feel free to ask any questions that may interest you.

Why is the series for 30 Rock the release name of the multi-season pack you grabbed?

2024-03-03 11:56:01.7|Debug|MetadataService|Writing Series Metadata to: /tvshows/30 Rock (2006) Season 1-7 S01-S07 (1080p AMZN WEBRip x265 HEVC 10bit AAC 5.1 Silence)/tvshow.nfo

Looks like this is where it stalls, if you turn off metadata file creation does it get stuck there still?

It’s the name when I’ve extracted when downloading from the torrent.
However, interestingly, when I’ve turned off metadata file creation, it doesn’t get stuck!

I’m not sure why it gets stuck there as file appears to be written entirely! It has content and everything.
Now that the metadata file creation is disabled, all is working normally. Weird!

Thanks for your help! But what would be the root cause behind this?

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