PMS Fails to Save Libraries

Server Version#: 1.15.1.710
Player Version#: Web Version

Here’s my setup:

CPU: i7-7700K 4.5Ghz - 5Ghz
RAM: 64GB DDR4
SSD1: 450GB NVMe
SSD2: 450GB NVMe
Internet: 1Gbit / 250Mbit
Host: https://us.ovhcloud.com
Storage: Google G Suite
Library Size: 500TB+

Here is whats going on;

PMS fails to save my Libraries. I’ve been able to add two successfully, but anything after that it says “Could not save changes” or it fails to load the directory. I followed this tutorial for the most part, minus PlexDrive, and any script usage. I manually did the installation of plex. Which shouldn’t be the issue. Dashboard won’t load any information either, even after a restart.

Any thoughts?

Tutorial: https://www.techperplexed.ga/2017/04/part-1-creating-infinite-plex-server.html

I need to see the DEBUG logs.

Settings - Server - Troubleshooting - Download Logs

Attach the ZIP with your reply.

This usually occurs when PMS doesn’t have proper permissions to its files.

Well, I changed one setting, and now my server has disappeared. I changed it back via the Preferences.xml file, and the server still won’t come back. Think I’m going to need to purge the install, and start over.

ChuckPA : http://datascorner.com/media/plex/logs/2019

Both those .zip files are ones I’m having trouble adding libraries too. Also, the Feb one is my original attempt, and the March is the new server I just threw up tonight.

Thanks. I see what was happening.

PMS was still performing initial setup. While it was responding it wasn’t really ready to jump right into heavy work.

It started at 03:09:20
At 03:09:40 (20 seconds later) You gave it something to do.

If you would stop PMS.
Erase (delete) the Library directory

Start it again, Claim it, then wait about 60 seconds before actually doing anything.

The reason for this is because it’s setting itself up and syncing with Plex.tv

Once you know it’s settled (CPU idle), then go ahead

Weird, I’ve never had this issue before. I’ll give it a go when I get back to my desk.

Same issue still arises. " Unable to load contents of ‘/media/Plex/Movies’" is what I get. I can add TVShows, but that’s it.

Should I be downloading the file from Plex’s website, or should I be adding the repo, and installing it via sudo apt-get install plexmediaserver?

I uploaded new logs. What I’ve differently this time is; I installed it as root, instead of my sudo user account.

Edit: I don’t think it’s Plex that’s the problem. I think it’s something I did when I had PG Blitz running. I was told to chmod/chown the directory. Think I might’ve messed stuff up, but we’ll see when I try to change it all back.

Download from the website directly.

I was offline today…

If you worry about chown/chmod. do the following:

  1. Stop Plex,
  2. Run the 3 commands below in sequence
  3. Start Plex
  4. Scan all the files, empty trash, clean bundles
  5. Now see if it starts behaving.
sudo chown -R plex:plex /var/lib/plexmediaserver
sudo find /var/lib/plexmediaserver -type d -exec chmod 755 {} \;
sudo find /var/lib/plexmediaserver -type f -exec chmod 644 {} \;

That didn’t help anything that I can see so far, my web client locks up after awhile and stops responding. Not sure if its because I have over a million files/folders in that directory or not. However, Radarr locks up when I try to add the directory. The only one that doesn’t do it is my TVShows/4K-TVShows directories.

You have over 1 million directories containing media?
May I ask how it’s organized? What types does it contain?

Here’s how it’s structured for TVShows and Movies;

/media/Plex/TVShows/Series_Name/Season 1/Episode.mkv (Sonarr Renaming Setup)
/media/Plex/Movies/Movie_Name/Movie.mkv (Radarr Renaming)

This is the total number of directories and files in my Movie collection, 19,886,974. As for folders itself, my movies Directory has over 25k movies in it. If you count all the extra info + subs, it can climb pretty quickly.

However, I think I figured the issue out. The directories show they are 644, and when I change them to 775 or 755, they work no problem. It’s taking me 3 hours so far to chown my movie directory.

There is no way PMS can index that. you have a commercial-grade Library of Congress of media.
I don’t know how or why you collected so much but you are looking at a Database measured in terabytes just to house the data.

There’s plenty of people I know with 500TB+ collection of media. What I think is going on, is that some how the permissions got screwed up. Once I changed the permissions to some directories, I was able to add ones that I wasn’t able to add before. The problem I’m having so far, is that the Movies library is so large, rClone is having I/O Errors. I think I’m going to need to rebuild it.

ChuckPA, Plex should have an indexer mode where it focuses on indexing and building the library. This would be a feature for large libraries. I figured out why mine is so friggin’ huge.

Each movie has 1 - 5 backgrounds, 1 nfo file, subtitles, and the movie itself. So that’s about 10 - 12 files per folder, and I’ve got 26k folders. Which is less than 500k. I have no idea how or why I have 20 million items. I guess I’ll delete the entire directory and rebuild it.

please do the following for me:

  1. List each top-level directory in the find command (add as many as needed)

sudo find /top-level-1 /top-level-2 -type d -print | wc -l

sudo find /top-level-1 /top-level-2 -type f -print | wc -l

  1. Report the total number of directories and files.

I get Input/Output Errors;
dreadstarx@us01-plex-1:~$ sudo find /media/Plex/Movies/ -type d -print | wc -l
find: ‘/media/Plex/Movies/’: Input/output error

dreadstarx@us01-plex-1:~$ sudo find /media/Plex/Movies/ -type f -print | wc -l
find: ‘/media/Plex/Movies/’: Input/output error

I think my mount is screwed up some how… Even if I have a massive library, it shouldn’t do this.

That is definitely a mount/network error. Regardless of the size, it should never fail at the filesystem level like that.

Got it figured out with the help of someone else. What was going on was the mount settings weren’t configured to allow others to access it, other than root. Which the service was running by my user, dreadstarx. The other problem was, I was having API timeouts because it was trying to load 500k directories / files etc… Everything is working now. I’ll be posting my setup and my configurations/scripts once I’m completely done.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.