Tv Shows library no longer detecting changes to folders automatically

Server Version#:1.28.2.6151

Hello everyone,

As per the title, a couple weeks ago my Tv Show library stopped adding episodes automatically, I have to manually do a scan of the library for the new episodes to show up. My movies, and music libraries do not however have any issues with getting new content.

I have tried changing the scanner from Plex TV Series to Plex Scanner Series but it doesn’t make any difference. There is also no activity shown to indicate if was stuck or not.

To reiterate all other library’s function normally its’ just the Tv Shows and it’s only been doing it for a couple of weeks.

Thanks in advance for any assistance.
Plex Media Server Logs_2022-09-10_13-29-24.zip (5.6 MB)

Perhaps Linux Tips - #9 by ChuckPa

Apologies but I’m not sure how that would help in this instance as I have removed entire series previously as well.

Based on that tip you suggested does that indicate that each library has a limit of 8192 directories? But I should note that I have less than 50 Tv Shows currently on my server so I do not think that is an issue.

Thanks for the reply though.

Lets start off with your plex server logs after performing a file scan.

This is a system parameter. It means number of folders in total on all mounted volumes.

To add to Otto,

8192 (on older 3.x and 4.x kernels versus 65536 on the newer 5.x kernels) represents the maximum number of entries in the kernel’s “inotify” (inode notification) table.

This is how PMS knows there were changes.

  1. PMS sets the notification request.
  2. When content is changed in a directory which is monitored, the kernel calls PMS with the “Hey, this changed” and what the change event is.
  3. PMS goes and resolves from there.

Hi, I have uploaded the log file after performing a scan.

It is best to do the following:

  1. Make certain DEBUG logging is enabled; VERBOSE disabled; SAVE if changes.
  2. Restart PMS (this is when automatic notification is initialized)
  3. Wait 3 minutes for all initialization to complete
  4. Download the Logs ZIP file from PMS
  5. Attach here

@ChuckPa they attached it to the OP.

@reqteq Im seeing some kind of file issue, Not sure if its permissions or what:
Sep 10, 2022 13:29:12.029 [0x7fc0b72b0b00] ERROR - Couldn't check for the existence of file "/media/TV Shows/The Real Housewives of Beverly Hills/Season 12/The Real Housewives of Beverly Hills - S12E13 - Rosé Colored Glasses WEBDL-720p.mkv": boost::filesystem::status: No error information: "/media/TV Shows/The Real Housewives of Beverly Hills/Season 12/The Real Housewives of Beverly Hills - S12E13 - Rosé Colored Glasses WEBDL-720p.mkv"

Thanks for that, after reviewing some more of the logs I noticed a couple of episodes from various shows with similar errors, and it seems to be corrupted or bad blocks on the drive. I am attempting to repair the drive and will update you guys when done.

Thanks again for all the help so far.

Sorry for the delay getting back on this.

  1. This error, is concerning. Where is Plex’s metadata stored ?
    – if it’s on a local HDD (USB, etc) Check it for file corruption (fsck)
    – If fsck and SMARTCTL testing reveals nothing
    –OR–
    – it’s remote read further.
Sep 10, 2022 02:12:40.746 [0x7fc0bbc57b00] ERROR - XML: Entity: line 1:\00
Sep 10, 2022 02:12:40.746 [0x7fc0bbc57b00] ERROR - XML: parser\00
Sep 10, 2022 02:12:40.746 [0x7fc0bbc57b00] ERROR - XML: error :\00
Sep 10, 2022 02:12:40.746 [0x7fc0bbc57b00] ERROR - XML: Start tag expected, '<' not found\00
Sep 10, 2022 02:12:40.746 [0x7fc0bbc57b00] ERROR - XML: Error: boost::filesystem::status: No error information: "/media/TV Shows/The Rea\00
Sep 10, 2022 02:12:40.746 [0x7fc0bbc57b00] ERROR - XML: ^\0

Other, more tangible errors

Sep 10, 2022 13:29:11.506 [0x7fc0b72b0b00] ERROR - IsDirectory failed boost::filesystem::status: No error information: "/media/Music/David Bowie"
Sep 10, 2022 13:29:11.518 [0x7fc0b72b0b00] ERROR - Couldn't check for the existence of file "/media/Music/David Bowie": boost::filesystem::status: No error information: "/media/Music/David Bowie"
Sep 10, 2022 13:29:11.529 [0x7fc0b72b0b00] ERROR - Couldn't get size of file "/media/Music/David Bowie": boost::filesystem::file_size: No error information: "/media/Music/David Bowie"
Sep 10, 2022 13:29:11.530 [0x7fc0b72b0b00] DEBUG - Skipping over directory '', as nothing has changed; removing 0 media items from map.

In most cases, this is a permissions error at a much lower filesystem layer… The number of layers involved can mask the real error.

Example

Docker – Brings ‘Directory’ on local host into the container

‘Directory’ can be seen because its parent directory provides “read”
The contents of ‘Directory’ can’t be seen for a few reasons:

  1. Permissions of ‘Directory’ are something silly like 700/711 which mask reading by anyone but the owner

  2. ‘Directory’ actually lives out on another device (NAS) and is blocked.
    – This occurs frequently with SMB.
    – (SMB grants your username access to the shared folder but not the “Plex” user

  3. The use of /media on any Linux system where Gnome , specifically the file manager Nautilus (and its automounter) are involved

On Ubuntu/Debian systems, automounted directories are placed in /media.
The permissions are set such that ONLY the logged-in user (you) can read them.
Plex cannot, EVEN IF, the file permissions grant it.

This doesn’t occur on Redhat-based systems because the automounter uses /run/media.

I will mention this FAQ as first point of investigation to see if the conditions described here apply.

If they do, recommendation is to implement the changes described.

  1. Local HDDs (internal or USB)
  1. Network shares

Bottom line? If not permissions then something put the lasagna in the blender and pressed ‘Liquify’ :see_no_evil:

Thanks for the very detailed reply,

The metadata is stored on a separate (local) hard drive than the media. All of my containers configurations are stored separately from my media. The /media is just the container’s uhh “mount”? I guess for the volume which is hosted at /data/…etc (if this is a problem still let me know! Because I had no idea about that). I don’t have any issues with permissions as the Movie Library works just fine.

But as I mentioned previously looking at the error tags in the log files, I tried removing that David Bowie folder in particular and it threw up a “Structure Needs Cleaning” so there is definietly some corruption and blended lasagna about :laughing:

Even using FTP to look at the files, the episodes that show the errors there is no data or file sizes show in the explorer.

I have fsck running at the moment which I will more than likely leave over night to see if any things come up and will get back to you guys.

Good News Guys,

After finishing the fsck and it doing its thing fixing all the issues on the drive the Automatic scanner is working again.

Thanks again guys for all your help.

PS. It would be nice if plex could have a notification or something when there is a basic problem scanning libraries etc, so that you can be on top of some of these issues.

Thats something your OS should have notified you about, I would recommend replacing the drive ASAP.

in /etc/fstab, the last number on each mount line is the FSCK order.

Please see man fsck

   The sixth field (fs_passno).
          This field is used by fsck(8) to determine the order in which filesystem checks are done at  boot  time.   The
          root  filesystem  should  be specified with a fs_passno of 1.  Other filesystems should have a fs_passno of 2.
          Filesystems within a drive will be checked sequentially, but filesystems on different drives will  be  checked
          at  the  same  time  to  utilize  parallelism available in the hardware.  Defaults to zero (don't fsck) if not
          present.

Oh, yea so as my media is on a separate drive all I did was fsck on that drive and it fixed the issue.

Hear me out, you are 1000% right that the OS should have notified me so I will be looking into proper monitoring and notification for my server. I like to think that I am still a relative noob when it comes to linux and servers in general.

But the reason why I think it would be nice for plex to give notifications especially when it has error reading files is because maybe like myself, there are others who just have their server as a set and forget and let the whole “automation” do its thing.

Plex is basically my most used access point to the server unless I decide to SSH in to run updates etc. which is good practice I suppose but still. That is why I think it would be beneficial for plex to let me know that something is wrong. Doesn’t have to be super specific but a little something is amiss" I would really like.

PS: Definitely going to pick up a new hard drive tomorrow. :sweat_smile:

This goes back to one of the key rules in software development. Your software is designed for one thing. When you start adding features not related to what that design is, your software starts to become a bloated disaster. Plex does log quite a bit in their log files, 98% of that is useless until you hit the 2% and need the rest for context. If you are not going to monitor your server, grab a log monitoring program and have it watch the plex logs for errors, Most of those notices will be pointless noise, but eventually when something breaks those logs will help you figure out what broke.

It’s all useful

:angry:

:stuck_out_tongue:

LOL

Respectfully,

  • Windows is usually preloaded on a machine
  • MacOS is preloaded on those machines
  • Linux is by choice therefore a certain level of mastery is expected

I always recommend learning Linux, with an installed PMS, in a VM before deploying as the main

Never said it it wasnt. When you are looking at the error codes, the rest of the logs are critical.