Butler Scheduled Task "UpgradeMediaAnalysis" keep running on same sets of files

Server Version#: 1.32.8.7639
Player Version#: n/a

This is an odd one (I always seem to run into odd behavior). Anyhow, over the last few days (however, I suspect its been going on longer than that) I noticed that when the nightly butler scheduled tasks kicks in, it wants to keep analyzing the same sets of files each time.

Yesterday, I ran a test where I changed the schedule window multiple times, for example from 7pm - 10pm and then again from 2am - 4am. From the logs I can see …

Dec 05, 2023 19:23:24.644 [140126938581816] DEBUG - [Req#140] The butler analyzed 3874 items.
Dec 06, 2023 02:19:00.326 [140126906026808] DEBUG - The butler analyzed 3874 items.

I’ve tried the following …

  1. looked at a sample of the files which are being analyzed by review the ID in the logs to see if I could find why. They are what appears to be random tv episodes spread across many shows and seasons and are various different file containers (mkv, mp4) and have different audio types (stereo, surround etc…).
  2. kicked off analyse on each library on my server and let the night task kick in afterwards.
  3. optimise db along with running the dbrepair tool from chuck.

I’ve 165k files on my server in total across movie, tv and music libraries. These 3,874 for some reason keep wanting to get the nightly “UpgradeMediaAnalysis” task run against them. It almost feels like the analysis is stuck for these.

So, before I go and nuke my server and reset it up cleanly does anyone know which table / column in the db contains the information on what plex is lining up for UpgradeMediaAnalysis ? I wonder if I manually cleaned that out and forced analyse again would it help.

BTW… full logs can be provided if requested but won’t be posted publicly.

On the off chance anyone from the plex team see this. I rebuilt my server plex yesterday cleanly and restoring my local watch history. However, over night yet again butler analyzed the same set of files again …

Dec 07, 2023 04:01:41.634 [139651805567800] DEBUG - The butler analyzed 3874 items.

There must be some bug in the scanner which keeps flagging these 3874 files to have UpgradeMediaAnalysis completed on them.

Again, this was AFTER a full complete re-install of the plex server starting with a new fresh db.

You can DM me logs.

It will analyze all episode/movie media that has a media_alaysis_version less than 6 (currently). I’d have to look at the logs to see where it’s failing.

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

@sa2000 Thanks for reopening the thread. I’ll get a clean set of logs today and db and send you a dm once I have them.

Thanks for the DB and logs captured immediately after butler tasks ran

I suspect at some point in the past, you had generate chapter thumbnails enabled. There are 3871 items for which we have flagged tat the chapter thumbnails need replacing. But … you disabled chapter thumbnails in server settings - and the butler code for re-analysis is detecting the flag on these 3871 items but not bothering to check if you have the feature disabled

I will be referring this as a bug to the development team

You could re-enable that setting and the number should then reduce from 3871

you can disable it again once you reach a point where the butler tasks finds no more items to analyze (assuming no changes made to media)

1 Like

Thanks. I have re-enabled the chapter thumbnails so will report back after the nightly butler tasks complete.

@sa2000 I can confirm that re-enabling Generate chapter thumbnails did allow the butler to process down the analyzer to zero. Thank you.

Mar 14, 2024 05:23:06.762 [127472755690296] DEBUG - The butler analyzed 0 items.

One question ? If I now disable chapter thumbnails again could | end up in the same situation in the future if media is replace/changed ? I guess my real question is should I just wait until the bug to detect if the feature is disabled is fixed before disabling this again ?

I’m having the exact same issue but I’ve always had Generate chapter thumbnails enabled. It just keeps iterating between files that are impossible to generate during scheduled tasks, even with media analysis unchecked.

Odd that with you actually turning Generate chapter thumbnails on actually fixed it :S

For me at least, I appeared to have chapter thumbnails which where in the queue to be generated and with the task being disabled they could never get processed. The bug which sa2000 mentioned above is with chapter thumbnails being disabled the analysis still picked up the detection flag for them and kept doing analysis. To clear this we just enabled the feature again to get them to process.

If the count showing as 0 needing to be analyzed - then you can disable chapter thumbnails. If the problem surfaces again then it would either be a different bug or you managed to slip in some changes to the media files between the time when the 0 items was logged by butler and for when you disabled the setting

1 Like

It is possible because we are getting errors during the analysis. Would be happy to investigate - would need debug logs during the analysis time and chapter thumb generation and also copy of the PMS database and one or more of the actual media files that are repeatedly being analyzed

1 Like

Hi @sa2000 , thank you! I have a separate thread here: Plex NOT respecting scheduled task settings. Keeps spinning up disks. HELP - #4 by Sptz87

Should I grab the logs when it starts doing media analysis during the scheduled tasks timeframe?

My main worry isnt the media not being able to be analyzed, I don’t mind living with those without preview thumbnails, my main issue is that it keeps spinning up my media disks during that timeframe because it forces that generation even though I select not to under scheduled tasks.

I have responded in your other thread