Plex Media Scanner Crashes Every Night

I have a larger media library than most (7000 video, 25,000 audio). Crash details…

Problem signature:
Problem Event Name: APPCRASH
Application Name: Plex Media Scanner.exe
Application Version: 1.7.5.4035
Application Timestamp: 5953a32b
Fault Module Name: StackHash_71ae
Fault Module Version: 6.3.9600.18696
Fault Module Timestamp: 5915ecd6
Exception Code: c0000374
Exception Offset: PCH_E8_FROM_ntdll+0x0003C8AC
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 71ae
Additional Information 2: 71ae90e54c7dde152581f70dae59c23a
Additional Information 3: ee9d
Additional Information 4: ee9d020a75b349ddde38d791f23b8df0

Win8.1PRO - no other issues with Plex. Intel Core i7-4790 @3.60GHz processor, 16GB RAM. Set up for background maintenance to start at 2AM and end at 5AM. Does the Plex Media Scanner crash when this time span not adequate? I’ve changed to 1AM to 7AM to check. Other thoughts would be appreciated.

Quit Plex server per its tray icon.
Deinstall Plex server using the normal Windows control panel. (Do not use ‘uninstaller’ software like Revo etc.)
Download the latest PMS 1.8.1 and install it manually.
Reboot your server machine
Wait 5 minutes before doing anything.
Watch the nightly behaviour.

Thank you for the response. I’m a Plex Pass subscriber and use the DVR capabilities (awesome BTW) - does PMS 1.8.1 support DVR? According to my dashboard, there are no updates available for my version of PMS.

@kws53 said:
Thank you for the response. I’m a Plex Pass subscriber and use the DVR capabilities (awesome BTW) - does PMS 1.8.1 support DVR?

Yes it does. The DVR functionality is now included in the default releases.

According to my dashboard, there are no updates available for my version of PMS.

You have your ‘update channel’ still set to ‘public’ instead of ‘Plex Pass’.
I recommend you to keep it that way if you are not interested to get always the latest releases (which may contain more bugs.) Just update this one time manually.

Otto - my Scanner is now crashing every night again. I typically get three or four “crash message” error windows. I tried the method that you recommended above but to no avail. It appears that something in my install is corrupted - with my large library, I’m concerned about the time it would take to rebuild the database.

I’m fairly Windows adept - I’m able to attempt manual “repair”.

Thanks for you help.

I’d need crash logs.

But before we fetch those, you can try something else:
disable hardware transcoding and monitor the server for a few days.
If the the crashes don’t occur anymore, we have a good indicator where to look.

Settings - Server - Transcoder - ‘Show Advanced’ - “Use hardware acceleration when available”

I’ve never had hardware acceleration activated - my intent was always to view my videos as “installed” in my library. I’ll send a log tomorrow. I do have “Send Crash Reports to Plex” checked off (but I assume that relates to Server Crashes?)

Thanks again for your immediate response!

Would I have a crash log saved by the system somewhere already?

It relates to crashes which happen on the server. So they should theoretically cover your scanner crashes as well.

I don’t know. You can have a look into the Windows logs.

https://support.plex.tv/articles/201455336-crash-logs-plex-media-server/

Make sure you have ‘debug’ logging enabled.
(leave the two check boxes below unchecked)

https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/

Debug Logging is/has been enabled throughout. However, in my Crash report directory, a file folder for 1.13.5456-ecd60042 was created but it is empty other than sub-directory names. A number of log text files exist, which I’ve compressed and attached.Logs.zip (19.7 MB)

Have looked at the logs and i can see the scanner crash reports but the logs were captured two days after the last crash report

Also the logs were zipped in-situ. Should never do that as the current open log files get skipped. If zipping the files yourself, copy out the Logs directory and zip the copy

The logs show last crash at 01:44 on Nov 7th. So logs should have been captured first thing in the morning of the 7th and not on the 9th. Depending on how much scanning activity we may need to increase the number of log files by adding registry entry LogNumFiles and setting it to, may be, 30

See https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/

I do have the crash reports but i need to see the logs that lead to the crash so we can identify the files involved and see if it can be reproduced with a sample

There was one crash on the 7th and it crashed within avcodec-58.dll
Crash in module avcodec-58.dll (0x6ab3f)

The previous crash was on the 2nd and was
Crash in method MediaInspectorFFmpeg::MediaInspectorFFmpeg(boost::filesystem::path const &)

All the crash reports generated for the avcodec-58.dll appear to be from Windows 8.1 systems (well it is 6.3 9600 which could also windows server 2012 R2)

The crash in MediaInspectorFFmpeg::MediaInspectorFFmpeg was in routine trying to find the stream information. So we do need the log for the scan that crashed and then can identify the file and see what the media info xml is within Plex Media Server and also get a copy of the file before any changes you make so as to try and replicate the problem and fix the crash

1 Like

Thank you for the information. I have attached an in-situ zipped COPY of the log directory. Today, I have also added LogNumFiles as a REGISTRY entry and set the number at 30 (decimal). Hopefully this will provide you with more data if necessary going forward.

I believe that the AVCODEC crash was a hardware crash (it has happened twice) that occurred when I was concurrently recoding some videos overnight to x264, and apparently doing media scans on Plex at the same time. This combination must have overwhelmed my CPU (i7) and it overheated. It was after the first crash that the Plex scanning operation started throwing errors.

I have stopped recoding videos overnight…Logs - Copy.zip (21.7 MB)

Do you have what you need?

No good. Last scanner crash 2 days before log files captured. Did you increase log files afterwards?

Scanner crashes at

Oct 15, 2018 01:46
Nov 02, 2018 01:40
Nov 07, 2018 01:44
Nov 11, 2018 01:25

Log files captured Nov 13, 2018 08:53

I think you need to make sure you capture the logs the morning after the scanner crashes. check every morning or save the logs every morning - and do check the LogNumFiles change - no evidence of it being in place in the logs

I’m slightly confused here - my scanner has crashed EVERY NIGHT for the past 2 weeks. When I look at my computer in the morning I have between three and five “Application Crash” windows open for Plex Scanner. I assume that you can’t see these crashes because 5 was too small a number for the LogFiles.

Attached is the latest zipped version of a COPY of the Log directory. This should reflect the change in LogNumFiles as I only made the change in this number AFTER I sent you the previous reply.

Also - I noticed in the LogFiles that there appears to be ‘transcoding’ errors. I have turned transcoding OFF anywhere I can find it in my setup. What could be transcoding?

May be crash reporting is not working - or the type of failure might be a factor. I do know that heap corruption crashes tend to fail to create a crash report. Similarly memory issues.

Still the same as before. The last crash report log is 11 November

Lets try and get the dumps from windows.
See this support article for the registry change to get windows to handle the crashes
https://support.plex.tv/articles/201455336-crash-logs-plex-media-server/

With windows handling the crashes, you can locate the dmp files in %LocalAppData%\CrashDumps`
You would still need to capture logs fairly soon after crashes
and please get information from the windows application event log for times of crashes of the Plex Media Scanner.exe process and what sort of crash

For Premium Music Libraries we sample each file by running transcoder job to process a few seconds of each file.

Thanks again for your help. I’ve attached a screen grab of the crash dump window. Typically I get three to five of these every morning - and they are all duplicates. Because I could not increase the window size, I captured two views of the same dump to obtain all the detail.

The transcoder jobs being run by Plex on Premium Music are what caused my hardware failures. I often run my own transcoding {MPEG2 to H264 or H264 (1080P) to H264 (720P)} overnight and this pushes my CPU to 85-90%. The additional transcoding being done by Premium Music overloaded my CPU and it failed by overheating. On a number of occasions, I have loaded thousands of songs at a time into the system, not knowing that transcoding (to what??) was being undertaken.

Crash1a

Crash1b

It seems to me that Plex should be transparent on this transcoding - franky, I don’t understand the need to do this. Could someone explain the reasoning behind it? My library is specifically divided by music quality (16bit, 24bit96, 24bit192, etc), and if Plex is transcoding this content into something else, I need to know.

Thanks again for your help and understanding.