I’ve been hosting Plex for many years on several machines but I’ve never come across this issue. The machine is running FreeNAS 11.1 and Plex is running in a jail. It’s installed via pkg
.
ISSUE:
The Plex Media Server process randomly crashes. It can run for weeks and suddenly just be gone from the list of running processes.
Here is a ps ax
output just after a crash:
PID TT STAT TIME COMMAND
15024 - SsJ 0:01.14 /usr/sbin/syslogd -s
15227 - SsJ 0:02.54 /usr/sbin/cron -s
15482 - INJ 4:21.62 Plex Plug-in [com.plexapp.system] /usr/local/share/plexmediaserver/Resources/Plug-ins-200287a06/Framework.b
17147 - IJ 13:00.92 /usr/local/share/plexmediaserver/Plex DLNA Server
17149 - IJ 0:13.14 /usr/local/share/plexmediaserver/Plex Tuner Service /usr/local/share/plexmediaserver/Resources/Tuner/Privat
17150 - IJ 153:16.28 Plex Plug-in [com.plexapp.agents.subzero] /usr/local/share/plexmediaserver/Resources/Plug-ins-200287a06/Fra
28413 - IWJ 0:00.00 Plex EAE Service (EasyAudioEncoder)
31736 - IWJ 0:00.00 /bin/sh /etc/periodic/daily/480.leapfile-ntpd
31740 - IWJ 0:00.00 sleep 58424
46310 - IJ 0:08.03 Plex Plug-in [com.plexapp.agents.localmedia] /usr/local/share/plexmediaserver/Resources/Plug-ins-200287a06/
46316 - IJ 0:07.65 Plex Plug-in [com.plexapp.agents.thetvdb] /usr/local/share/plexmediaserver/Resources/Plug-ins-200287a06/Fra
62138 - INJ 0:16.64 Plex Plug-in [com.plexapp.system] /usr/local/share/plexmediaserver/Resources/Plug-ins-200287a06/Framework.b
62143 - IJ 0:02.83 /usr/local/share/plexmediaserver/Plex DLNA Server
62144 - IJ 0:00.16 /usr/local/share/plexmediaserver/Plex Tuner Service /usr/local/share/plexmediaserver/Resources/Tuner/Privat
62145 - IJ 7:29.03 Plex Plug-in [com.plexapp.agents.subzero] /usr/local/share/plexmediaserver/Resources/Plug-ins-200287a06/Fra
62489 - IJ 0:02.98 Plex EAE Service (EasyAudioEncoder)
72143 0 SsJ 0:00.02 /bin/csh
72447 0 R+J 0:00.00 ps ax
Note that the other Plex related processes are running but the Plex Media Server process is just gone.
The weird thing is that I don’t see anything in the logs either. Here are the last lines of the Plex Media Server.log
file after the crash.
Aug 19, 2018 14:57:34.462 [0x80af4c100] DEBUG - handleStreamRead code 335544539: short read
Aug 19, 2018 14:57:34.469 [0x80af4c100] DEBUG - Auth: authenticated user 1 as parski
Aug 19, 2018 14:57:34.470 [0x80d734800] DEBUG - Request: [10.110.110.141:60009 (Subnet)] GET /player/proxy/poll?deviceClass=pc&proto
colVersion=1&protocolCapabilities=timeline%2Cplayback%2Cnavigation%2Cmirror%2Cplayqueues&timeout=1 (6 live) TLS GZIP Signed-in Token
(parski)
Aug 19, 2018 14:57:34.470 [0x80d734800] DEBUG - Beginning read from two-way stream.
Aug 19, 2018 14:57:34.889 [0x80e476f00] DEBUG - Request: [127.0.0.1:41665 (Loopback)] GET /library/metadata/7551 (7 live) GZIP Signe
d-in Token (parski)
Aug 19, 2018 14:57:34.894 [0x80e476f00] DEBUG - We're going to try to auto-select an audio stream for account 1.
Aug 19, 2018 14:57:34.894 [0x80e476f00] DEBUG - Selecting best audio stream for part ID 10798 (autoselect: 0 language: en)
Aug 19, 2018 14:57:34.894 [0x80e476f00] DEBUG - Audio Stream: 25118, Subtitle Stream: -1
Aug 19, 2018 14:57:34.895 [0x80af4c100] DEBUG - Completed: [127.0.0.1:41665] 200 GET /library/metadata/7551 (7 live) GZIP 6ms 1690 b
ytes
Aug 19, 2018 14:57:34.901 [0x80d734800] DEBUG - Request: [127.0.0.1:41666 (Loopback)] GET /library/metadata/7551 (7 live) GZIP Signe
d-in Token (parski)
Aug 19, 2018 14:57:34.906 [0x80d734800] DEBUG - We're going to try to auto-select an audio stream for account 1.
Aug 19, 2018 14:57:34.906 [0x80d734800] DEBUG - Selecting best audio stream for part ID 10798 (autoselect: 0 language: en)
Aug 19, 2018 14:57:34.906 [0x80d734800] DEBUG - Audio Stream: 25118, Subtitle Stream: -1
Aug 19, 2018 14:57:34.907 [0x80af4c100] DEBUG - Completed: [127.0.0.1:41666] 200 GET /library/metadata/7551 (7 live) GZIP 6ms 1690 b
ytes
Aug 19, 2018 14:57:34.912 [0x80e476f00] DEBUG - Request: [127.0.0.1:41667 (Loopback)] GET /library/metadata/7472 (7 live) GZIP Signe
d-in Token (parski)
Aug 19, 2018 14:57:34.919 [0x80e476f00] DEBUG - There were 1 top-level paths for Futurama.
Aug 19, 2018 14:57:34.919 [0x80af4c100] DEBUG - Completed: [127.0.0.1:41667] 200 GET /library/metadata/7472 (7 live) GZIP 7ms 1647 b
ytes
Aug 19, 2018 14:57:34.926 [0x80d734800] DEBUG - Request: [127.0.0.1:41668 (Loopback)] GET /library/metadata/7551 (7 live) GZIP Signe
d-in Token (parski)
Aug 19, 2018 14:57:34.931 [0x80d734800] DEBUG - We're going to try to auto-select an audio stream for account 1.
Aug 19, 2018 14:57:34.931 [0x80d734800] DEBUG - Selecting best audio stream for part ID 10798 (autoselect: 0 language: en)
Aug 19, 2018 14:57:34.931 [0x80d734800] DEBUG - Audio Stream: 25118, Subtitle Stream: -1
Aug 19, 2018 14:57:34.932 [0x80af4c100] DEBUG - Completed: [127.0.0.1:41668] 200
GET /library/metadata/7551 (7 live) GZIP 6ms 1690 bytes
Aug 19, 2018 14:57:35.942 [0x80e478800] DEBUG - Checking if time for scheduled update
Aug 19, 2018 14:57:35.943 [0x80e478800] INFO - It's been 1199 seconds, so we're starting scheduled library update for section 10 (Mo
vies)
Aug 19, 2018 14:57:35.943 [0x80e478800] DEBUG - Library Updater: Requested that section 10 be updated, force=0, deep=0, subdir= iTun
es=0
Aug 19, 2018 14:57:35.943 [0x80e478800] DEBUG - Library Updater: Queueing section 10
Aug 19, 2018 14:57:35.943 [0x80e478800] INFO - It's been 1199 seconds, so we're starting scheduled library update for section 11 (TV
Shows)
Aug 19, 2018 14:57:35.944 [0x80e478800] DEBUG - Library Updater: Requested that section 11 be updated, force=0, deep=0, subdir= iTun
es=0
Aug 19, 2018 14:57:35.945 [0x80e478800] DEBUG - Library Updater: Queueing section 11
Aug 19, 2018 14:57:35.945 [0x80cc47500] DEBUG - Scanning section 10
Aug 19, 2018 14:57:35.945 [0x80cc47500] DEBUG - Killing job.
Aug 19, 2018 14:57:35.945 [0x80cc47500] DEBUG - Signalling job ID 70551 with 9
Aug 19, 2018 14:57:35.945 [0x80cc47500] DEBUG - Job running: EAE_ROOT='/tmp/pms-23fa7688-9747-48b8-b0b3-8b60c82d0220/EasyAudioEncode
r' FFMPEG_EXTERNAL_LIBS='/usr/local/plexdata/Plex\ Media\ Server/Codecs/e944d3a-1309-freebsd-x86_64/' X_PLEX_TOKEN='xxxxxxxxxxxxxxxx
xxxx' '/usr/local/share/plexmediaserver/Plex Media Scanner' '--scan' '--refresh' '--section' '10'
I’ve set up a watchdog script that just notes when the server goes down but it hasn’t made me any wiser. How can I find out why the process is dying and what to do about it? Has anyone else had this issue?
Server Version#: 1.13.4.5271
Player Version#: Not applicable