[BUG] New music agent - excessive scanning (cpu, disk activity)

Server Version#: 1.18.2.2015
Player Version#: 4.12.2 (hosted)

Bug report for:

The new music scanner/agent is doing excessive scanning for no apparent reason. I have 98 unmatched albums. Adding a new album results in 23 minutes of scanning, high CPU utilization (80-97%), lots of disk activity - for no reason (except for the added album). The 98 unmatched albums are scanned 3 to 5 times, when adding to the music library.

Adding album:

Nov 11, 2019 11:01:15.171 [0x7fb928567700] INFO - Library section 3 (Music) will be updated because of a change in ‘“/share/CACHEDEV2_DATA/Media/Audio/Music/T”/Twenty One Pilots’

Scanner/agent activity stops:

Nov 11, 2019 11:24:48.330 [0x7fb9394b7700] DEBUG - Done with metadata update for 4195

This is 23 minutes to add a single album!? 
 No one can use plex when this happens, since up to 97% CPU utilization = buffering.

I cleared the logs folder, before adding the new album. Debug mode only (no verbose). 3000 lines have been removed from the logs (showed folder structure).

Plex Media Server Logs_2019-11-11_11-22-46.zip (1.6 MB)

1 Like

I created a test library with only 13 albums, all listed at MusicBrainz, so there are no unmatched albums. To test the idea that unmatched albums are the source of Plex re-scanning the library, I added one album, again with a match available at MusicBrainz.

To my surprise, a scan of the complete library was triggered. Naturally, it only took a minute or so to match the new album, and scan the whole library, because there are only 14 there now. But even with all matched albums, the whole library was re-scanned. I have logs to prove it, and the console and alert views in Plex web show it while it’s happening

On my real music library, that scanning takes anywhere from 10 minutes to half an hour. There are unmatched albums in that library,

In my case the scanner hangs sometimes on correct media, what was scanned successfully in past. Now I rescan my lib and the scanner is hanging with 100% cpu utilization. PMS 1.18.2.2041.

Although Plex won’t acknowledge it, there is something buggy about the scanner.

  • the scanner seems to try and match unmatched albums / artists every time a new album is added, or if the embedded metadata in one file is changed.
  • the scanner doesn’t respect the setting “Run a partial scan when changes are detected” which is supposed to only scan the folder that has changed.
  • the scanner will re-scan and re-match albums / artists that are already matched for no apparent reason.

The usual response is that it is some kind of user error - files are not tagged properly, folder and/or file structure is not correct, the album is not listed in the MusicBrainz database, etc.

We can only hope they are working behind the scenes to fix these problems, because the new music system is not quite as “Awesome” as they claim.

3 Likes

I’m not sure that the scanner “Plex Music” is affected. It seems the matching hangs PMS, because new agent “Plex Music” is linked with the new scanner and match action doesn’t re-analyze files. I found examples of the issue. Please check this: https://www.allmusic.com/album/bach-english-suites-mw0001845831. In my case local agent works fine with embedded tags, but new scanner/agent hangs.

1 Like

Still finding a lot of unnecessary and repeated scanning of the music library whenever new music is added.

examples:

  • if an artist is not found, every unmatched artist is re-scanned again, looking for a match
  • if an album is not found, every unmatched album is re-scanned. This seems to include albums by an artist that are matched properly.
  • adding 2 or more new artists and/or albums at the same time appears to set off multiple scans, equivalent to the number of artists/albums that have been added.
  • and again, the scanner/agent doesn’t appear to respect the rules to only scan the folder that has changed. That would eliminate the first 2 points above.

The music libraries are included in the regular maintenance schedule. There is no need to repeat over and over again outside of that schedule when new material is added to search for a match. If they were unmatched a few hours ago, they are probably still unmatched,

Please fix this.

I just rolled my server back to 1.17. I can’t take it anymore. WHen they fix it I may upgrade. But until then, I’ll stay on 1.17.

To prove my points from my previous post, I’m attaching logs.
Plex Media Server Logs_2019-12-10_07-20-27.zip (5.5 MB)

It’s plain to see, that for every album added, every unmatched album and artist were re-scanned. There were a total of 15 albums added, 12 new artists which were not in the library before. All of the albums were tagged with MusicBrainz Picard.

Adding 15 albums, in the space of about 3 minutes should not initialize 15 scans for unmatched albums or artists. It’s ridiculous that Plex doesn’t even recognize this is a problem.

I have am also struggling with this issue, many albums cannot be matched manually or otherwise and for my collection of 600 albums, added a new album will trigger a scan that will last 1.5 hrs
I recently deleted my music library and started from scratch and can easily see the process of the unnecessary scans as the library get larger.

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