Plex crashing overnight

I’m running PMS on unraid in docker. Every night the container crashes and needs to be restarted. Please could somebody have a look at my log files. Thank you.
Plex Media Server Logs_2023-04-05_10-26-31.zip (3.9 MB)

Server Version#: 1.31.3.6868
Player Version#: 4.100.1
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

Plex Media Server Logs_2023-04-06_10-45-16.zip (4.7 MB)

Here are the complete logs from an hour ago after restarting an unresponsive PMS. It appears to have hung around 8am server time. @ChuckPa can you offer any insight on this? I would be much appreciated.

Thank you … I’m going through them now.

I found in your logs where PMS got totally jammed up on the database.

It got so bad that it gave up.

Questions:

  1. Is PMS installed on HDD or SSD ?
  2. Approximately how many items do you have indexed ?
  3. When’s the last time the DB was optimized (fully) ?

Hi-

  1. PMS is on SSD
  2. 31523 episodes and 2924 movies
  3. I ran your script yesterday Auto. Afterwards I optimized the db in plex.

Thanks for your help

That’s not good.

  1. Your i9 is a screamer.
  2. Hopefully your SSD is NVMe and has recently been trimmed.

I’m half inclined to:

  1. stop PMS
  2. Make a backup of the databases directory by hand
  3. Upgrade the image to 1.32.0
  4. Let those fixes get in there.

I say this because I’m running now on both this babynuc unraid and a Syno DS418j (ARMv8 with 1GB ram) and it’s not failing.

Something is slowing you down – badly…
Are there any other CPU or I/O intensive tasks running?

SSD is NVMe and I have it set to trim daily.

How do I upgrade to 1.32.0? I can manually backup the db directory. There are no other CPU or I/) intensive tasks running.

I’m using linuxserver/docker-plex

Should I switch to binhex/arch-plexpass?

there is no need to switch to those.

They are only our binaries repackaged in their images
(PMS source is not public)

  1. Go into the container
  2. /plex_service.sh -d (stop it)
  3. Now get into “/config/Library/Application Support/Plex Media Server/Plug-in Support”
  4. Nice easy way to make a backup
tar cf  DB-Backup-2023-04-06.tar ./Databases
  1. You now have the entire “Databases” directory saved

Should you ever need restore it:

rm -rf Databases        (to clear out the existing)
tar xf DB-Backup-2023-04-06.tar

Make sense ?

EDIT:

I don’t remember the LSIO stop command. (check the directory structure) Either

  1. s6-svc -d /var/run/service/svc-plex
    -or-
  2. s6-svc -d /var/run/s6/services/plex

OK thanks. How do I upgrade the image?

I’m running 1.32.0.6865 now. Is there anything else I should be doing?

C’mon… You’re using docker… That is something you should already know.

Lemme give you a hint… You want to pull a new version :wink:

As for what to do next. I would:

  1. Run my DBRepair tool to get the DB fully optimized
  2. Make certain your Intro and credits detections are set where you want them.
  3. Now wait until morning.

done. I will report back :slight_smile:

I ended up doing a fresh install. Now I’m trying to Move Viewstate/Ratings from One Install to Another using https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/

Any idea how to install Sqlite3?

See GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases

I’ve done that. Nothing was saving the db so I started over. Now I just want to merge the Viewstate and Ratings from the old db to the new. Having an issue with Sqlite3 following the guide I posted

No you haven’t.
8 - 'import' viewstate (Watch history) from another PMS database

You missed that functionality

1 Like

I see that now. What is the db with watch history?

The database files you had from the last install.

Start/Stop feature not available

Select

1 - ‘stop’ - (Not available. Stop manually)

Any idea why I can’t stop ? Im running through unraid container terminal because that is the only way I know