Plex Media Server regularly suddenly unavailable

Server Version#: 1.41.6
Player Version#:
NAS# TS251
QTS: 5.1.9.2954

I am finding that I am regularly (every six weeks, approximately) losing access to my Plex Media Server, internally and externally. I noticed it today while out and then came home and could not log in to the ip address of my PMS. When I stopped and then restarted the app in QNAP’s app center, it popped up right away and started working. This however is not tenable going forward.

I had some issues when I was running Emby on the DNS always changing and I figured out how to adopt port forwarding and to use a dynamic dns (no-ip).

I have read through the instructions here and when I manually specified the port to be 32400 as it suggested, it then set “Not available outside your network” and then I clicked to enable remote access and it said it was working.

What do I need to do to ensure this won’t happen again?

Please note: I do have a static IP address set for my QNAP address.

Server logs are attached.
Plex Media Server Logs_2025-07-19_18-32-26.zip (4.7 MB)

Thanks for the logs.

At this point, I can’t tell if this problem is related to another problem just reported and reproduced

That error is: PMS Scanner sees a music file and starts to analyse is.
Because of the tags in the file, PMS gets caught in an infinite loop until it crashes or is killed with OOM (Out of memory) error.

Have you been able to identify which file causes this yet ?
If so, may I have a copy of it to test / reproduce here ?

Secondary info: QTS 5.2.5.3145 build 20250526 is available for your machine.

No. I am going through sonic analyzing my albums so I guess that could be it. Are you talking about sonic analysis?

How would I even begin to diagnose this.

If I may say I have noticed this problem frequently before in the last year. Every four to six weeks or so. It reminds me of when I was with Emby , I needed to adopt port forwarding and a DDNS to solve the problem but I do not know if thst is what is going on here.

Advice?

Using the history of what was happening at the time of the crash,
Rolling backwards:

Jul 19, 2025 06:20:09.527 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:09.527 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24093
Jul 19, 2025 06:20:10.038 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24093 is 0 (success)
Jul 19, 2025 06:20:10.039 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder" -i "/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/13 If Things Were Perfect.mp3" -ac 1 -ar 16000 -acodec pcm_s16le track-0012.wav
Jul 19, 2025 06:20:10.039 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:10.039 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24103
Jul 19, 2025 06:20:10.134 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24084 is 0 (success)
Jul 19, 2025 06:20:10.134 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder" -i "/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/14 Everloving.mp3" -ac 1 -ar 16000 -acodec pcm_s16le track-0013.wav
Jul 19, 2025 06:20:10.134 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:10.135 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24106
Jul 19, 2025 06:20:11.171 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24106 is 0 (success)
Jul 19, 2025 06:20:11.176 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder" -i "/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/15 Inside.mp3" -ac 1 -ar 16000 -acodec pcm_s16le track-0014.wav
Jul 19, 2025 06:20:11.176 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:11.176 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24110
Jul 19, 2025 06:20:11.289 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24103 is 0 (success)
Jul 19, 2025 06:20:11.295 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder" -i "/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/16 Guitar Flute & String.mp3" -ac 1 -ar 16000 -acodec pcm_s16le track-0015.wav
Jul 19, 2025 06:20:11.295 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:11.295 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24113
Jul 19, 2025 06:20:11.960 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24113 is 0 (success)
Jul 19, 2025 06:20:11.960 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder" -i "/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/17 The Sky Is Broken.mp3" -ac 1 -ar 16000 -acodec pcm_s16le track-0016.wav
Jul 19, 2025 06:20:11.960 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:11.966 [140021180103480] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24117
Jul 19, 2025 06:20:12.574 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24110 is 0 (success)
Jul 19, 2025 06:20:12.574 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder" -i "/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/18 My Weakness.mp3" -ac 1 -ar 16000 -acodec pcm_s16le track-0017.wav
Jul 19, 2025 06:20:12.574 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:12.574 [140021182212920] DEBUG - [Butler/MusicAnalysis/JobRunner] Jobs: Starting child process with pid 24126
Jul 19, 2025 06:20:13.283 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24117 is 0 (success)
Jul 19, 2025 06:20:13.592 [140021838949176] DEBUG - Jobs: '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Transcoder' exit code for process 24126 is 0 (success)
Jul 19, 2025 06:20:13.593 [140021210032952] DEBUG - [Butler/MusicAnalysis] Decoded 18 files for input to the analyzer.
Jul 19, 2025 06:20:13.593 [140021210032952] DEBUG - [Butler/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex\ Media\ Server/Codecs/3e1b2b0-942daf2dc73f6618466d358d-linux-x86_64/' "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex Media Server" "Plex Music Analyzer" /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-c8020dda-a80a-479a-88ed-64380736b902 /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Resources/Music.tflite labels index.txt
Jul 19, 2025 06:20:13.593 [140021210032952] DEBUG - [Butler/JobRunner] In directory: "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/tmp/music-analysis-input-51c76d84-7b3d-4f7b-a2c8-0c3b918fdad7"
Jul 19, 2025 06:20:13.593 [140021210032952] DEBUG - [Butler/JobRunner] Jobs: Starting child process with pid 24131
Jul 19, 2025 06:20:54.467 [140021184322360] DEBUG - Checking if time for scheduled update
\00\00\00\00\00\00\00\00
/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/16 Guitar Flute & String.mp3
/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/17 The Sky Is Broken.mp3
/share/CACHEDEV1_DATA/Multimedia/Music/Moby/Moby_ Play/18 My Weakness.mp3

Is there a 19th song in that album sequence ?
Whatever followed the 18th is what failed.


Regarding this:

If you see it with Emby and now PMS then it’s clear you have a corrupt media file.

Finding it in the collection of music is going to be hard, one at a time, trial and error.

No I don’t think you understand what I am saying about Emby. The problem there was the problem thst the external IP was always changing. I needed to adopt port forwarding with a dynamic DNS. Thst solved thst problem.

Should I be looking at that type of problem here?

Re this album:
There is no 19th track. Thank you very much for looking into this.

Let me ask this question:

  1. Is this about PMS failing / crashing and becoming unavailable
    -or-
  2. Is this about remote access not reliably working ?

This, from your OP, is referring to PMS failure / crash and not about any DDNS issues / Emby issues which are clouding the thread and probly best should never have been mentioned ??

Which are we focused on please ?

To be honest I am not entirely sure. My first instinct was that this was a problem with remote access and the need for a DDNS because I had been through that with Emby. However, now that I think about it I think it might be a crashing issue for the reason that when I got home I could not even access Plex inside the LAN.

Assuming that is the case what should my next move be?

Correct. The problem here is that there is a piece of media which is causing PMS to crash.

The only way I know of to find this is by inspection and trial-error.

Not knowing the order you media gets added to the system, we inspect all of it and then examine all of it, sorted by date.

This does require we SSH into the QNAP

  1. SSH (windows 10/11 machines, Mac, or Linux) – or Putty SSH
  2. The menu system will offer to help you. Q (quit the menu) and Y (yes to quit)
  3. You now have the command line prompt. Type (or copy/paste) these commands
cd /share/CACEDEV1_DATA/Multimedia
find . -type f -exec stat -c "%y %N" {} \; | sort -k1,3 > /share/Public/DateSortedFileList.txt
find . -type d -exec stat -c "%y %N" {} \; | sort -k1,3 > /share/Public/DateSortedDirList.txt
  1. It will take a bit to run both commands. There will be NO intermediate output.
    (Linux is terse). As each completes, the command line prompt will return.
    When done with both commands,
  2. in the Public shared folder, the files ‘DateSortedFileList.txt’ and ‘DateSortedDirList.txt’ will be present.
  3. You can open these in any text editor you want.
  4. You’ll see the date/time in column 1 and the path to the file in column 2.
  5. Search down for the Moby/Moby_ Play/ album

This is where trial and error begins.

Using either list, ( The directory list is probably best to start with ), See what came next after the Moby album.

Now diagnose by trial-removal (move somewhere PMS can’t see it) and re-run the analsys.

You’ll sadly have to slug your way through this until you find it.

Ok I can probably tackle this.

Some questions.

  1. How do you know that the crash was caused by a scan. Where do you see that in the logs?
  2. What scans would cause this? Just the sonic analysis? Or a general scan of library files?
  3. If we assume that I can’t fix this in the next two weeks should I suspend any scanning activities as a hack to avoid this? I am leaving on a road trip in three weeks and I really do not want this to happen again.
  4. Another hack might be to set a schedule to turn the qnap off every night and on again every morning to reset the app. Advisable?

Answers:

  1. I do not definitively know the scan caused it. I can only deduce it crashed during the scan because I saw none of the other typical activities which follow music scanning. The nature of the log files looks very much like an OS crash (a string of nulls at the end of a file is the OS attempting to flush buffers to disk as power is failing).
    QTS will restart itself after an OS crash. What do your system logs show for that time? Did the host crash or just PMS?

  2. Media analysis (“Update media analysis during maintenance”) or Sonic Analysis.

  3. If you can’t locate the specific file(s) causing this, which easily can take longer than two weeks – dependent on the size of your music library, the only thing you can do is disable all analysis options from Scheduled tasks and confirm it doesn’t crash prior to your departure.

  4. Restarting the QNAP will not bring relief. PMS will encounter the file again at some point. The challenge is to a) find the file and resolve it or b) turn off most of the analysis features.

This is a “Labor of Love” task. The commands above will help you find files after the Moby albums. Those are the one(s) to start looking closer at.

Your alternative is to make a list of what you have, delete what you have, then re-rip / acquire it again.

Please remember, Plex is not a media curator. It does not modify your media.
It can only try to use what’s given to it.

Thank you. I’ll work on this. Is there something being worked on at Plex to avoid a full crash? Or is it going to be solely on us to avoid corrupted files? I’m looking for the system logs of the NAS now.

Which is the best, quickest analysis to run to expedit the process? A library scan?

As we find these problems, with the help of sample files, we work to make PMS more robust and tolerate more.

This is why finding that failing file(s) helps you and everyone else ( I will submit the sample to Engineering with the problem description for them to dive deeper and enhance PMS coding)


If you can start the process of “divide & conquer” (successive reduction by 1/2), each attempt will get you closer.

e.q. this sequence. As example —

  1. Break the media into two parts (A-M) and (N-Z)
  2. Now run analysis on the A-M group. If fails, Break A-M in half and try again.
  3. If A-M group passes, check N-Z.

Process of elimination will eventually get there. It’s going to be time consuming.

You’ll end up testing 1/2 - 1/4 - 1/8 - 1/16 - 1/32 - 1/64 - 1/128 … until you get to a small group

OK, thanks for all your help.

I dont’ know if this helps your or not, but the files from those commands are here. what I find odd is that there are different time stamps between the directory list and the file list.

Slightly modified files are attached here. I just deleted a bunch of rows of irrelevant files in other folders to make the size fit here.

In the directory list, the moby album is the last file, but not so in the file list. But they have different time stamps???

DateSortedDirList.txt (1.6 MB)
DateSortedFileList.txt (3.7 MB)

Yes, it’s possible for directories and files to have different modification times.

If Moby was the last directory but not the last group in the file list, I would use the file list and start digging.

OK, this may not be possible given my busy life. What kinds of analyses might trigger this? The “Analysis” menu option that pops up when you hover over the three dots of an artist, album or track? OR does it have to be the “media analysis” or “sonic analysis” as a scheduled task?

The most rigorous analysis occurs during scheduled tasks (at night) when everything runs.

If you don’t have the time to walk through it, another method will be to
stand up a new server with another name (in a VM / container / another host) and add media directories to it slowly (giving PMS time to work its way through everything)

If you use this approach, when it fails, you’ll know the “most recently added” is where the problem is.

Now you can start sub-dividing that.

All the time you’re doing this, you can use cron to restart PMS as needed

Cron docs here:

Thanks. This sounds more manageable to me.

What should I be using the cron jobs for in this setup? I have used cron before in other domains.

I’d make an extremely simple script.

#!/bin/bash

# Plex crashed?
if [ "$(pidof 'Plex Media Serv')" = "" ]; then
  # Plex stopped, restart all processes
  /etc/init.d/plex.sh stop
  sleep 30
  /etc/init.d/plex.sh start
fi

This little script does not know if PMS is turned off (disabled) in app center.
Adding that is one more line.

I am not sure what this is for. Is this to facilitate finding the corrupt file? Or is this a failsafe to ensure if there is a crash while I’m away it can get reactivated? Thank you.