Synology - Plex stops after certain time

We have two Synology servers with both running Plex. After a certain time both servers suddenly stop the Plex service. This could be 1 hour or after 36 hours. In the Synology Log there is nothing to see why the service would stop. After starting the service again all is working straight away without any problems. See below for some more information and the log files. Could someone see why the service stops?

It looks like our Crew Plex is stopping more often, this one is also getting used more. All our clients are the same, Apple TV 4K.

Crew Plex:
Synology: FS2017
Server Version#: DSM 7.1.1-42962 Update 6
Plex version: 1.40.0.7998
Plex Log:
Logs-Crew.zip (5.3 MB)

Guest Plex:
Synology: RS2818RP
Server Version#: DSM 7.1.1-42962 Update 6
Plex version: 1.40.0.7998
Plex Log:
Logs-Guest.zip (4.3 MB)

Edit: added Plex version.

Updated both servers yesterday to version 1.40.1.82227-7000 in hope this would solve the issue. But, after a couple of hours one of the servers already crashed?

Log file Crew:
Logs.zip (4.9 MB)

The crash was around/at 21:39 (22-03-2024) according to my port scanning log file. I’m scanning port 32400 every couple of minutes to monitor.

@FFX

How good are you using Putty / SSH command line?

Are you good enough to run my tool and clean up the Photo Transcoder cache?

I ask because, while I can’t prove anything, I see a lot of photo transcoder timeouts right before it does crash.

I’m wondering if there are so many files that it’s causing PMS a problem.
If that’s true then we have a bug which needs fixing.

One way to diagnose is prune out all the old photo transcoder files and see what happens.

Alternatively, you could just purge all entire cache and let it regenerate what it needs as they are needed.

If you’d like to purge only the older files, we can use my tool (PlexDBRepair)
If you want to purge it all, you can
– Stop Plex
– FileStation → PlexMediaServer/AppData/Plex Media Server/Cache/PhotoTranscoder
– Delete everything in that transcoder cache folder. (there are probably a lot of files)

My tool, which has a Purge command , is here.

I have a lot of documentation and usage instructions in the README.md file

please don’t hesitate if you have more questions.

Putty / SSH commands it not a problem. What would you like me to do, I’m happy with purging all files if needed. If this makes it easier for you to see if there is a bug or not!

What I’d like you to try:

  1. Download the tar.gz of my tool and put it in a shared folder on the Syno (PlexMediaServer works ok for this… at the top)

  2. SSH into it (Enable SSH – Control Panel - Terminal & SNMP)
    – Turn it off again when done

  3. sudo bash (be root)

  4. tar xf filename.tar.gz (whatever version you put there)

  5. Invoke DBRepair.sh

  6. Now
    – Stop Plex
    – Prune
    – Make note of how many files it wants to delete (so we have diagnostic info)
    – Let it prune them
    – Start Plex

  7. You can stay in the tool and try things in PMS. It always checks if PMS is running for those important things

  8. If you want to optimize (deep optimization) of the DB while it’s stopped,
    use the ‘auto’ command.

Thank you, I have done the pruning.
13917 files were pruned, see below for a screenshot:

Prune

Haven’t done any other commands yet, will monitor the status of the server for the next day or so and see what happens.

I’m currently testing with some players but half of them won’t even play a movie. Just getting a spinning wheel. Some do play but also takes 1 or 2 minutes to start a movie. Would it be good to optimize the database as well?

capture those log zips and post

I’ll analyze in the morning (my time)

Logs:
Logs.zip (4.8 MB)

Thanks, will wait for you until optimizing or any other commands.

before I go…

what’s the Metadata forr “The Bad Guys” and The Lost King ?

I suspect it’s trying to transcode for the AppleTV on a machine which is woefully unable to do the job.

Night.

See below for both NFO’s.

The Bad Guys: The Bad Guys 2022.txt (9.3 KB)
The Lost King: The Lost King 2022.txt (12.2 KB)

Plex XML for both movies: The Lost King 2022.zip (1.2 MB)

And yes, all our clients are Apple TV 4K. On two Apple TV’s I’m able to play these movies. In Plex Dashboard I then see Direct Play.b

when you have “Some that work” and “Some that fail”, the server is not the problem.

what’s the difference (AppleTV model / age / tvOS version / network configuration-location ) between those which work and those which don’t ?

All are the same Apple TV with same OS. Most are connected by Wi-Fi and just a couple by LAN.

But, I’m more curious on why the server keeps crashing.

I am also curious.

I’m afraid that there’s a deep database corruption which is causing it to fail without warning.

I don’t see such a thing often.

If you have the opportunity, and don’t mind taking one of the server’s down for a while, the process would be:

  1. Stop PMS
  2. Open FileStation → PlexMediaServer
  3. RENAME ‘AppData’ → ‘AppData-KEEP’ (so it’s not confused with anything)
  4. Start PMS
  5. Now setup a new server on that NAS–
    – IMPORTANT: Give a “TEST” friendly name so it doesn’t cause problems with the live/production server
  6. Add some media sections to it.
  7. When ready, TEST

If it still fails at this point, I suspect the machine (overheating, etc – It just happened to me due to internal dust)

Unfortunately I can’t take these servers off that long. I could take them offline for a day but not really longer.

Could I use your database tool to scan the database on corruption?
I had a look at the servers and they are both clean, they are inside a cooled rack and temperatures are not getting above 20 degrees Celsius inside the rack and the NAS is about 23 degrees Celsius.

Given the servers are running,

  1. The physical structure of the DB is intact.

  2. The tool has no way of knowing if the contents of the records are valid or not
    ( It has no intelligence about what’s in the DB – and that’s beyond what a shell script can do )

  3. If you were to rebuild one, how long would it take ?

Mm ok. Makes sense.
I would have no idea how long it would take to rebuild the database. Is there anyway I can check this or?

Just did the prune removal on the other (Guest) server, see below for the results:

Screenshot 2024-03-24 094752

Plex seems to be running fine again after running this tool. Just to make sure I have also used the auto function of the DBRepair tool. Thank you for the help.

@FFX

The ‘auto’ command does the following:

  1. Checks the DB files to ensure they aren’t physically damaged (basic sqlite is valid).
  2. Exports all the valid records from the file to ASCII (text) file.
    (exporting ignores anything which was deleted or otherwise orphaned in the files)
  3. Import back into fresh DB files which will become the live files
  4. Check the DB validity after import
  5. Rebuild all the indexes
  6. Check the DBs again.
  7. If there are no errors to this point,
    – Move the current DB files off to the side.
    – Move the new DB files to be used as production
    – Cleanup
  8. Return to the menu

There is another function you can use for cleaning things up.
“Prune” will clean out the PhotoTranscoder directory (it tends to collect old posters which aren’t used).

@ChuckPa thank you. We can close this topic.