Hi - I’m running Plex 1.0.2.2413 on a WD MyCloud EX2 Ultra and every night after my scheduled PMS update the Plex Media Scanner CPU usage shoots up to 50% and sits there indefinitely. The only way I can get it down is to either kill that specific process, or reboot the server. I’ve looked through the debug logs for “Plex Media Scanner Analysis” but I don’t see any errors that would be causing this. Can anyone help me understand which files are doing this?
Also, this only happens with the nightly update - I think it has something to do with the metadata refresh. When I do a manual library refresh the media scanner runs, and then stops right after (as it should).
Thanks for the reply - I guess I should also clarify:
Thumbnail generation is disabled for all my libraries
Video preview is disabled for all my libraries
I have no content syncing
I have no optimizations running
DLNA server is disabled
Also, I have background maintenance tasks set to start at 2am, and end at 5am. My logs show all this activity starting at 2am, but then the activity never stops, which leads me to believe the scanner is getting hung up on something.
@jdgd said:
Also, one additional point - the process running is not the Plex Transcoder, it’s the Plex Media Scanner
Yes, that is helpful.
According to your last log, the last item to be analyzed was Jul 22, 2016 02:37:36.444 [0xb561f150] DEBUG - Updating part with ID=285 [/shares/jdgd-media/Media/Movies/The Amazing Spiderman 2.m4v]
After that there was no ‘analysis’ activity.
So it is either the Spider man movie itself or the movie which was to be analysed after this.
(I am not sure, but I think the movies are treated by the butler in the reverse order they were added to the library, i.e. the newest items get treated first. You should be able to determine the right files by their date stamp).
Remove those files from the library, then wait fo the next ‘scheduled tasks’ run.
Thanks for the reply. I removed the file you mentioned, and the one after (both alphabetically and in terms of what was added), but my server still gets hung up every night doing the scheduled tasks.
@jdgd said:
Thanks for the reply. I removed the file you mentioned, and the one after (both alphabetically and in terms of what was added), but my server still gets hung up every night doing the scheduled tasks.
At least the logfiles should be compared, to see at which point the server hung this time.
But please do provide this time all the log files. Just zip them up together.
Don’t forget to enable debug logging (but not ‘verbose logging’)
Yes, in all likelihood you have chapter support turned on, and this scanner activity is tied to this function. Turn the option off completely, or set it to scheduled maintenance times if you need the function for whatever reason.
Restart the server after making any changes to this setting. Look at server activity in a day or so and see if it’s something more in line with your needs.
This is something that was put in recently, but there isn’t a lot of documentation on the feature yet. Hopefully that will change soon.
@jdgd said:
Thanks guys. See attached for the complete log file zip - I waited to see if it happened again tonight and it did.
@jdgd said:
Thanks for the reply - I have Chapter Thumbnails disabled. However, I wen through and re-enabled and then disabled it again to see if that helps.
The evidence shows that it is the extended what is logged as “Deep Analysis” that got stuck on this file /shares/jdgd-media/Media/Movies/Star Wars A New Hope.m4v
The Deep Analysis which is more detailed analysis of the media files kicks in as part of Scheduled Tasks and it processed 13 files and on the 14th file - it got stuck.
Jul 25, 2016 02:58:21.731 [0xaec6f400] DEBUG - Butler: Scheduling deep analysis for: Star Wars
Jul 25, 2016 02:58:21.732 [0xaec6f400] DEBUG - Job running: FFMPEG_EXTERNAL_LIBS='/mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-wd-armv7/' '/mnt/HD/HD_a2/Nas_Prog/plexmediaserver/binaries/Plex Media Scanner' '--analyze-deeply' '--item' '2331' '--log-file-suffix' ' Deep Analysis'
The process concluded when you (?) abandoned the stuck process at 08:28am
Jul 25, 2016 08:28:19.705 [0xb25c7400] ERROR - JobManager: child process killed by signal: 15 (Terminated)
Jul 25, 2016 08:28:20.544 [0xaec6f400] DEBUG - The butler performed deep analysis on 14 files
Jul 25, 2016 08:28:20.569 [0xaec6f400] DEBUG - Butler: Completed task DeepMediaAnalysis in 20309.7 seconds.
I will report this to the Plex Devs as the code is intended to timeout any lengthy processing - in any case butler scheduled activities do have an end time
Is it at all feasible to provide the source file by uploading somewhere and sending me a link by private message. it is quite big and producing a sample using techniques outlined here may now result in the same issue when the sample is used
Hey sa200 - thanks for the reply. This is extremely helpful - I really appreciate you looking through the logs and helping identify this issue.
In regards to your questions:
I manually killed the Plex Scanner process at 8:28am. No need (imo) to keep it running if it’s been stuck on something since 2am.
I will attempt to figure out a way to get a sample of the file online somewhere so that I can provide it. I will report back tonight and let you know if I’ve been able to.
@jdgd said:
Hey sa200 - thanks for the reply. This is extremely helpful - I really appreciate you looking through the logs and helping identify this issue.
In regards to your questions:
I manually killed the Plex Scanner process at 8:28am. No need (imo) to keep it running if it’s been stuck on something since 2am.
I will attempt to figure out a way to get a sample of the file online somewhere so that I can provide it. I will report back tonight and let you know if I’ve been able to.
The devs are working on making changes to kill and timeout deep scan processes - but I still think it would be good to identify why it is looping / hanging on your media files - so getting one of these files to debug would be really useful