Plex Media Scanner has stopped working.

Hey Guys,

I am new to plex media server so hopefully this is the right place for this question.

I have noticed after installing Plex Media Server on my Windows 7 Pro PC (has all latest updates) that intermittently a crash occurs and Plex Media Server stops responding until it is restarted.

I checked the logs and found this critical error which may be the source of the problem.

Could someone have a look and please provide a suggestion.

Thanks,
Paul

2017-08-13 11:42:08,168 (1d50) : CRITICAL (core:574) - Exception in the search function of agent named ‘Home Theater Backdrops’, called with keyword arguments {‘id’: ‘20715’, ‘guid’: ‘com.plexapp.agents.lastfm://Prince?lang=en’, ‘force’: True, ‘primary_agent’: ‘com.plexapp.agents.lastfm’, ‘parentID’: None} (most recent call last):
File “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-313f93718\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py”, line 1007, in search
agent.search(*f_args, **f_kwargs)
File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-313f93718\HTbackdrops.bundle\Contents\Code_init
.py", line 36, in search
for artist_result in ArtistSearch(media.primary_metadata.title):
File “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-313f93718\HTbackdrops.bundle\Contents\Code_init_.py”, line 19, in ArtistSearch
for artist in XML.ElementFromURL(SEARCH_ARTIST % String.URLEncode(artistName), sleep=1.0).xpath(’//image/title/text()’):
File “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-313f93718\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\parsekit.py”, line 345, in ElementFromURL
).content, encoding=encoding, max_size=max_size)
File “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-313f93718\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\parsekit.py”, line 301, in ElementFromString
return self._core.data.xml.from_string(string, encoding = encoding)
File “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-313f93718\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\data.py”, line 162, in from_string
return etree.fromstring(markup, parser=(xml_parser if remove_blank_text else None))
File “lxml.etree.pyx”, line 2743, in lxml.etree.fromstring (…\src\lxml\lxml.etree.c:52665)
File “parser.pxi”, line 1573, in lxml.etree._parseMemoryDocument (…\src\lxml\lxml.etree.c:79932)
File “parser.pxi”, line 1452, in lxml.etree._parseDoc (…\src\lxml\lxml.etree.c:78774)
File “parser.pxi”, line 960, in lxml.etree._BaseParser._parseDoc (…\src\lxml\lxml.etree.c:75389)
File “parser.pxi”, line 564, in lxml.etree._ParserContext._handleParseResultDoc (…\src\lxml\lxml.etree.c:71739)
File “parser.pxi”, line 645, in lxml.etree._handleParseResult (…\src\lxml\lxml.etree.c:72614)
File “parser.pxi”, line 596, in lxml.etree._raiseParseError (…\src\lxml\lxml.etree.c:72123)
XMLSyntaxError: None

Need to see zip of the logs - taken after restart following a crash - you can download zip of the logs through the web interface

Make sure debug logging enabled in advance and server restrated after that to get fresh log files created
Then on next crash, restart and load the Plex Web interface and go to settings / server / help / download logs
and attach the zip here
There would be references to crash reports and last activity logged before crash

See
https://support.plex.tv/hc/en-us/articles/201643703-Reporting-issues-with-Plex-Media-Server
https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files

Hi,

Thanks for responding back. I have attached the zipped debug logs.

Let me know what you find.

Thanks again for your swift assistance.
P.R.

Here is another log from another crash.

@pau1r0g3n said:
Here is another log from another crash.

For the new logs which you say are from another crash - I cannot actually see a server crash
What the server logs show is

  • you shut down the server at Aug 14, 2017 16:23:57 (presumably clicking Exit in System Tray popup)
  • Server re-launched at 16:24:01
  • Server shut down 16:34:06
  • Server re-launched at 16:34:09 (that is too close to the shutdown for it to have been manual - do you have automated restart ? service ? )
  • Server shut down August 15th 07:44:18
  • Server re-launched 07:44:21

Do you have some tools / scripts that is doing this?
If I manually shutdown Plex Media Server I would not relaunch immediately 3 seconds later

Please could you explain what was happening and also tell me what you mean about the server crashing and at what time

I do not have any scripts in place to restart your PMS.

I notice when PMS does crash is seems to still be running in the sys tray (bottom right), which may explain why you see it getting immediately restarted in the new logs.

When I mention server crash I am referring to your PMS crashing, Windows & Pro OS is still operational and working just fine.

Were you able to find any additional information regarding the critical error reported in the first set of logs I sent you? (2017-08-13 11:42:08,168 (1d50) : CRITICAL)

Next time PMS crash I will wait a few seconds before restarting it, but I am not certain if that will help if the PMS continues to run in systray.

Maybe there is a setting in PMS that restart it from a crash?

@pau1r0g3n said:
I do not have any scripts in place to restart your PMS.

I notice when PMS does crash is seems to still be running in the sys tray (bottom right), which may explain why you see it getting immediately restarted in the new logs.

When I mention server crash I am referring to your PMS crashing, Windows & Pro OS is still operational and working just fine.

Were you able to find any additional information regarding the critical error reported in the first set of logs I sent you? (2017-08-13 11:42:08,168 (1d50) : CRITICAL)

Next time PMS crash I will wait a few seconds before restarting it, but I am not certain if that will help if the PMS continues to run in systray.

Maybe there is a setting in PMS that restart it from a crash?

OK so it is not a crash as i define it to be.

When a Plex Media Server process crash occurs, the process terminates and the system tray plex icon would disappear.
In your case, you are getting some issue which then I presume makes you go to the Plex system tray icon and select Exit and then relaunch it What I seeing in the logs is that action of user initiated shut down (exit button in Plex system tray pop up) and then relaunch

I will re-look at the logs to see what was happening before you decided you needed to shut it down and re-launch

If you were not clicking on Exit in system tray plex icon, it means there is something else forcing a shut down - which is unlikely

The critical error extract you pasted was just an agent error and it can be looked into without seeing all the other related log files

I will have another look at the logs.

What symptoms do you get when you think it crashed ?

[For future - please refer to crashes when the Plex Media Server.exe process disappears from Windows Task Manager and the Plex system tray icon disappears]

I have updated the title of this post to reflect the actual problem after realizing it is a Plex Media Scanner issue not the server.

On a daily basis, at least once a day, a Window popup message appears that says “Plex Media Scanner - Plex Media Scanner has stopped working” with the following details listed below.

Do you think there is a problem scanning my media for whatever reason?

I have also attached new logs.

Let me know what you think.

Thanks!
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_5363
Fault Module Version: 6.1.7601.23864
Fault Module Timestamp: 595fa490
Exception Code: c0000374
Exception Offset: 000ce8fb
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 5363
Additional Information 2: 5363aa3c16068929fed885c4f83af5ee
Additional Information 3: e610
Additional Information 4: e6100825bbfd3c3ed0e82081720c25d6

That is a heap corruption scanner crash Exception Code: c0000374

Memory corruption issue in ffmpeg leading to such crashes in the scanner and transcoder was fixed in the plex pass release 1.8.0.4109

See release notice

Current Plex Pass release is version 1.8.1.4139

You can set the server / setting / general / show advanced to Plex Pass to get notified of new versions

Thanks! I am updating to PMS version 1.8.1.4139 now I will let you know how everything goes.

Hi,

Just wanted to check back in after a couple days of running with no issues after updating to the latest PMS version.

Thanks again for your Help!