Frequent Scanning -- Why?

I have a Plex Media Server running on a Mac mini, Catalina (10.15.7)
Server Version#: 1.21.1.3830-6c22540d5

PMS is scanning the library frequently when I’m playing content and even sometimes when I’m not – is there a way from the logs to find the trigger for the scan? I don’t want to turn off scanning on activity, because I want it to pick up new content without having to manually scan, but … I also don’t want it chewing up resources scanning when it doesn’t have to, so I’m trying to dig in a little deeper and find out why it’s scanning and what I can do about it.

Advice?

What path(s) have you set for your library folders? You can find this by editing your libraries and checking the Add Folders tab. It sounds as though you may have specified a location that includes more than just your media, maybe the root of a volume or somewhere higher in the full path?

The path should be set just to the location of a particular category of media. For example, if all of your movies live on /Volumes/SomeDrive/Media/Movies, you’d add that path exactly. You wouldn’t add just /Volumes or /Volumes/SomeDrive. If you do, and you add files anywhere higher in the path hierarchy, Plex Media Server will pick up changes outside of your “Movies” folder and perform a scan.

No – TV Shows for instance are at:

/Volumes/Vault/TV
/Volumes/Vault2/TV/Anime
/Volumes/Vault2/TV/Animated
/Volumes/Vault2/TV/Comics

The first is the original bucket in one DAS volume, the rest are subdivided buckets on the second DAS volume. And yet, these will be scanned a bit too frequently. I guess that’s why I was hoping that I could find the triggering event in one of the logs or something so I’d have a better idea of what was triggering all the scanning.

Looking at this I see you have structured your storage incorrect.

Example:
/Volumes/Vault2/TV Animations
/Volumes/Vault2/TV Anime

( Library Paths should be like above)

So now inside TV Animations you have Sub folders of Titles and inside Episodes.

TV Animations/
Tom and Jerry Tales (2006)
/Season 01
/Tom and Jerry Tales - S01E01 - Tiger Cat - Feeding Time - Polar Peril.ext
/Tom and Jerry Tales - S01E02 - Joy Riding Jokers - Cat got your luggage - City Dump Chumps.ext
/ and so on
The Simpsons (1989)/
/Season 01
/The Simpsons - S01E01 - Simpsons Roasting on the Open Fire.ext

If named this way the scanner will not try to refresh if there are no changes in the folders.

Sorry, not sure that I understand. My problem is frequent scanning, not having the scanner fail to try to refresh?

So, just to be clear, I have folders like these:

  • /Volumes/Vault/TV
  • /Volumes/Vault2/TV/Anime
  • /Volumes/Vault2/TV/Animated
  • /Volumes/Vault2/TV/Comics

Each of these is added to Plex independently.

Each folder under the above will correspond to a series. Within those, folders for seasons. Within those are files for episodes:

  • /Volumes/Vault/TV/3 Percent
  • /Volumes/Vault/TV/3 Percent/3 Percent - Season 1
  • /Volumes/Vault/TV/3 Percent/3 Percent - Season 1/3 Percent - s01e01.mkv

Or:

  • /Volumes/Vault2/TV/Anime/Jojos Bizarre Adventure
  • /Volumes/Vault2/TV/Anime/Jojos Bizarre Adventure/Jojos Bizarre Adventure - Season 1
  • /Volumes/Vault2/TV/Anime/Jojos Bizarre Adventure/Jojos Bizarre Adventure - Season 1/Jojos Bizarre Adventure - s01e01 - Episode 01.mkv

These children aren’t added to Plex, the scanner picks them up. And, again, I’m not having troubles with the scanner picking up the files, I’m just having trouble that the scanner seems to be running frequently when I haven’t changed anything. If I watch a TV episode on the mini, I’ll see Notification Center notifications several times during a single episode, which suggests that something is triggering the scanner either as a result of my watching the episode or, possibly, for an unrelated reason. I don’t recall seeing those notifications when I’m doing something else on the same machine, but I don’t spend a lot of time working on the mini when it’s not doing HTPC tasks.

I believe your paths are one level too deep

https://support.plex.tv/articles/naming-and-organizing-your-tv-show-files/

Too deep how? It’s organized exactly how that guide suggests – I just have multiple top-level folders added to Plex, because a single top-level folder was starting to get unwieldy (I have lots of content in Plex):

Multi paths are fine to use, just not one more level.

Where do you have your transcoder temporary directory set to? You can check this here:
Settings -> Transcoder (Show Advanced) -> Transcoder temporary directory

If it is set to a path which is included in any of your library paths, temporary files written there during playback will cause a scan to be initiated.

Other than that, your paths look mostly ok. Plex’s naming guidelines require that TV series season folder names just be the word “Season” a space and number. Your season naming probably isn’t causing this issue, but could cause problems with correct matching in the future.

Where do you have your transcoder temporary directory set to?

Not set to anything; not sure where they go in that case? The docs don’t seem clear on that point.

The default directory is ~/Library/Caches/PlexMediaServer/Transcode on macOS.

If you’d like to provide debug logs from around the time problem occurs they may show the reason for the automatically triggered scans. If you do, please note the time you started playing media and when the scanning began.

If you’d like to provide debug logs from around the time problem occurs they may show the reason for the automatically triggered scans. If you do, please note the time you started playing media and when the scanning began.

I’ve done a little poking around in the logs without finding much – I can see the scanner is being triggered, but I haven’t found anything that suggests why.

Is it just the scanner logs, or are there other logs that might contain useful info?

I’d expect the interesting information to be in the Plex Media Server logs (the ones actually named Plex Media Server). I’m fairly certain the server actually monitors the folders and invokes scans when necessary.

Yeah - you’ll see messages like this when it’s triggered by a “Scan Automatically” / FSEvents notification.

Library section 14 (Other Videos) will be updated because of a change in '"/path/to/file.mp4"'

1 Like

Allright, so things got busy and I didn’t diagnose for a bit.

Turns out I do see those “will be updated because of a change” messages in Plex Media Server.log when I change files. But during playback if I see a scan notification and then pause and go look in the same log, I don’t see that message. On a quick scan, I don’t see anything obvious in the logs from that time period except playback, although I am no expert on Plex logs. I just saw another notification as I’m typing, “Library Scan Complete”. Whatever triggers the scanning during playback doesn’t show up in that log file.

Any ideas what else it come be other than FSEvents / Scan Automatically, and where I could find more information?

I see some of this if it’s relevant:

Jan 18, 2021 19:12:55.363 [0x70000c6b1000] DEBUG - Putting plug-in com.plexapp.agents.localmedia to sleep.
Jan 18, 2021 19:12:55.363 [0x70000c6b1000] DEBUG - Stopping [com.plexapp.agents.localmedia].
Jan 18, 2021 19:12:55.363 [0x70000c6b1000] DEBUG - [com.plexapp.agents.localmedia] Killing.
Jan 18, 2021 19:12:55.366 [0x70000c39f000] WARN - JobManager: Could not find job for handle 75261
Jan 18, 2021 19:12:56.870 [0x70000c193000] DEBUG - Putting plug-in com.plexapp.agents.plexthememusic to sleep.
Jan 18, 2021 19:12:56.870 [0x70000c193000] DEBUG - Stopping [com.plexapp.agents.plexthememusic].
Jan 18, 2021 19:12:56.870 [0x70000c193000] DEBUG - [com.plexapp.agents.plexthememusic] Killing.
Jan 18, 2021 19:12:56.873 [0x70000c39f000] WARN - JobManager: Could not find job for handle 75262
Jan 18, 2021 19:12:57.984 [0x70000d0ed000] DEBUG - Putting plug-in com.plexapp.agents.themoviedb to sleep.
Jan 18, 2021 19:12:57.984 [0x70000d0ed000] DEBUG - Stopping [com.plexapp.agents.themoviedb].
Jan 18, 2021 19:12:57.984 [0x70000d0ed000] DEBUG - [com.plexapp.agents.themoviedb] Killing.
Jan 18, 2021 19:12:57.988 [0x70000c39f000] WARN - JobManager: Could not find job for handle 75263
Jan 18, 2021 19:13:00.153 [0x70000cf64000] DEBUG - Stopping file watcher for com.plexapp.agents.thetvdb

Seems like it might be something to do with the Premium Music library section? I let a log filter run while I watched a couple of TV shows.

% tail -F Plex\ Media\ Server.log | grep -i "library section\|scan"
Jan 22, 2021 13:01:14.247 [0x70000c422000] DEBUG - Activity: registered new activity 838ddc04-1404-40ae-a923-05940ccfabbf - Scanning
Jan 22, 2021 13:01:14.247 [0x70000c422000] DEBUG - Scanning section 5
Jan 22, 2021 13:01:14.247 [0x70000c422000] DEBUG - Activity: updated activity 838ddc04-1404-40ae-a923-05940ccfabbf - completed 0.0% - Scanning Premium Music
Jan 22, 2021 13:06:14.240 [0x70000cee1000] DEBUG - Activity: registered new activity 42ac2577-989d-45c7-932f-0e7f31e26608 - Scanning
Jan 22, 2021 13:06:14.240 [0x70000cee1000] DEBUG - Scanning section 5
Jan 22, 2021 13:06:14.240 [0x70000cee1000] DEBUG - Activity: updated activity 42ac2577-989d-45c7-932f-0e7f31e26608 - completed 0.0% - Scanning Premium Music
Jan 22, 2021 13:11:14.231 [0x70000c734000] DEBUG - Activity: registered new activity c41937f5-2e29-4d04-8690-b4e184392a2e - Scanning
Jan 22, 2021 13:11:14.231 [0x70000c734000] DEBUG - Scanning section 5
Jan 22, 2021 13:11:14.231 [0x70000c734000] DEBUG - Activity: updated activity c41937f5-2e29-4d04-8690-b4e184392a2e - completed 0.0% - Scanning Premium Music
Jan 22, 2021 13:11:49.032 [0x70000c422000] DEBUG - Sync: scanning for items to reprocess in sync list 37277886
Jan 22, 2021 13:11:49.032 [0x70000c422000] DEBUG - Sync: scanned for items to reprocess in sync list 37277886
Jan 22, 2021 13:11:49.032 [0x70000c422000] DEBUG - Sync: scanning for items to reprocess in sync list 14541523
Jan 22, 2021 13:11:49.033 [0x70000c422000] DEBUG - Sync: scanned for items to reprocess in sync list 14541523
Jan 22, 2021 13:16:14.225 [0x70000c940000] DEBUG - Activity: registered new activity a8e62d1f-c86e-421c-9072-63cfaecdf53f - Scanning
Jan 22, 2021 13:16:14.225 [0x70000c940000] DEBUG - Scanning section 5
Jan 22, 2021 13:16:14.225 [0x70000c940000] DEBUG - Activity: updated activity a8e62d1f-c86e-421c-9072-63cfaecdf53f - completed 0.0% - Scanning Premium Music
Jan 22, 2021 13:20:02.990 [0x70000d2f9000] DEBUG - Sync: scanning for items to reprocess in sync list 37277886
Jan 22, 2021 13:20:02.990 [0x70000d2f9000] DEBUG - Sync: scanned for items to reprocess in sync list 37277886
Jan 22, 2021 13:20:02.990 [0x70000d2f9000] DEBUG - Sync: scanning for items to reprocess in sync list 14541523
Jan 22, 2021 13:20:02.990 [0x70000d2f9000] DEBUG - Sync: scanned for items to reprocess in sync list 14541523
Jan 22, 2021 13:21:14.223 [0x70000c83a000] DEBUG - Activity: registered new activity 310885cd-b9f1-4e2f-bbae-6a48d7d5377a - Scanning
Jan 22, 2021 13:21:14.224 [0x70000c83a000] DEBUG - Scanning section 5
Jan 22, 2021 13:21:14.224 [0x70000c83a000] DEBUG - Activity: updated activity 310885cd-b9f1-4e2f-bbae-6a48d7d5377a - completed 0.0% - Scanning Premium Music
Jan 22, 2021 13:26:14.340 [0x70000c422000] DEBUG - Activity: registered new activity 1348c063-4ff9-4b5b-8d0d-8ceea523a6f8 - Scanning
Jan 22, 2021 13:26:14.340 [0x70000c422000] DEBUG - Scanning section 5
Jan 22, 2021 13:26:14.340 [0x70000c422000] DEBUG - Activity: updated activity 1348c063-4ff9-4b5b-8d0d-8ceea523a6f8 - completed 0.0% - Scanning Premium Music
Jan 22, 2021 13:29:02.355 [0x70000cee1000] DEBUG - Request: [127.0.0.1:64923 (Loopback)] GET /system/scanners/8 (16 live) GZIP Signed-in Token (diathesis)
Jan 22, 2021 13:29:02.355 [0x70000cee1000] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/scanners/8
Jan 22, 2021 13:29:02.355 [0x70000cee1000] DEBUG - HTTP requesting GET http://127.0.0.1:58117/system/scanners/8
Jan 22, 2021 13:29:02.363 [0x70000cee1000] DEBUG - HTTP 200 response from GET http://127.0.0.1:58117/system/scanners/8
Jan 22, 2021 13:29:02.363 [0x70000c528000] DEBUG - Completed: [127.0.0.1:64923] 200 GET /system/scanners/8 (16 live) GZIP 8ms 585 bytes (pipelined: 4)

I don’t see what’s triggering the scan, though – any ideas about where I can find more information on that front?

If all else fails, I might just remove this library section – I don’t really use Plex for music TBH.

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