Files not being added to only one Library

Server Version#:1.31.1.6782-7000 (Synology DS920+)

Hey guys, So, I have a folder on my NAS that all my new media gets sent to from my PC’s after being downloaded. It’s literally a ‘Downloads’ catch-all folder. I would then manually move that media to it’s TV show or Movie folders.

However, About a month ago, The Library i have that pointed to my downloads folder stopped updating. New files would be downloaded and be sent to that folder, but Plex would not scan the folder and add the files in the library.

Usually when i add a new TV show, Episode, Movie, about 10 seconds or so after moving the file over plex would scan it, then add it to the library, In this library, it no longer does that. I don’t think i’ve changed any settings or anything, I’m perplexed.

Nothing works in this ‘Downloads’ library now. I can click the ‘3-dots’ and ‘Scan Library Files’ and it would scan and update correctly. But it has stopped doing that automatically and it’s driving me crazy, So i’d have to update the library manually every time new files are sent to the NAS from my PC. Considering i have several users who also check this library, Constantly doing this isn’t viable.

I have this library set up as follows":

Library Type: Other Videos

Scanner: Plex Video Files Scanner

Agent: Personal Media

Visibility: Exclude from home and search

Enable Cinema Trailers = No

Enable Video Preview Thumbnails = Yes

Collections = Disabled

I use personal media / Other videos as if i use a ‘movies’ library, TV shows wont show up when they’re downloaded.

Any help would be greatly appreciated. Thank you. I’ve been struggling with this for awhile.

Have you seen this?

My server has permissions. I just double checked.

My server is set up with the currently file structure
NAS >
Media > (This folder is being given the access/permissions in DSM)
-TV Shows
-Movies
-Downloads

The TV shows, and Movies folders are scanned as new files are added, but the Downloads folder is not.

I have 3 Libraries, 2 work, 1 does not. All 3 Library folders are inside a ‘Media’ folder that Plex has permissions for.

Thank you for the reply.

I think I missed this in my initial read of your issue.

There is a default limit of how many folders Linux allows PMS to keep track of

My question to you is:

IN TOTAL, for all the media you have PMS index, How many folders are involved?

On older DSM systems, the limit was 8192 folders.
On newer DSM systems, the limit was increased but not a lot.

Using Filestation, right-click on each shared folder containing media → Properties.
Let DSM give you the count of folders & files in it.

Total the folder counts.

If greater than 8192, we should start planning
If greater than 65536, we need to increase the table limit (easily done)

1 Like

I went to filestation, Here are the properties that show for the over-all ‘Media’ Folder that all my libraries are contained in. (TV Shows, Movies, Downloads)

“Contain 62363 file(s), 9001 folder(s)”

Considering the issue is contained to only one of my 3 libraries, i doubt it’s an over-all issue with DSM, as why would it still work perfectly when adding new media/folders to ‘TV Shows’ and ‘Movies’?

Thank you for your reply.

I was keying on the “Automatically” part. That’s where the notify table limit comes into play.

Next part,

  1. You have a shared folder with sub-folders.

  2. Two of three sub-folders work ; one doesn’t

  3. Have you set permissions and “Apply to this folder, sub-folders, and files” ?
    (permissions get broken a lot on DSM when automated tools or we push media over SMB)

With exception to needing Read/Write, This is the permission setting steps I’m talking about. (lower left corner)

When checking my ‘Media’ folder, That ‘Apply to this folder, sub-folders and files’ checkmark is NOT checked.

However, after i check it and click save, when i open the properties window again, the box is unchecked again.

That said, When i check the rule i made in the permission editor i have ‘applies to’ set to ‘ALL’ which also selects ‘This Folder’, ‘Child Folders’, ‘Child Files’, All Descendants’.

Is that the same thing? would that give plexmediaserver the permission it needs to scan the ‘downloads’ folder?

It should apply but, as a matter of process, why would you want it to try and scan things being downloaded / constructed in a partial status? Such files are incomplete and will cause failure to / false matches.

My TV episodes come into my downloads.

I review them then as part of my FileBot renaming, FileBot does the final move to where PMS sees them.

It keeps partial / damaged files away from PMS until known ready

I’m not sure i understand.

I don’t want anything that’s currently being downloaded to be scanned.

The way it works is, I download items on my PC. when completed, i move those files over to my ‘Downloads’ folder on my NAS. this folder, as mentioned, has it’s own Plex Library, where the files are not being detected.

At no point am i downloading directly into the ‘downloads’ folder on my NAS. all ‘from-the-internet’ downloading is done onto my Windows PC, Then the complete downloads are simply moved to the NAS.

It used to scan those files. i would then see they’re new episodes, movies, etc in the downloads library. I could watch them from there, or then go and place them as needed in TV shows Library, or Movies Library.

Now they don’t show up, hence the problem.

@FourForty

How about we try this?

As a test,

  1. Create a test library section.
  2. It monitors the same downloads folder
  3. You don’t share that folder with anyone (it’s just for scan testing)
  4. Let it populate
  5. Observe the results.

If the behavior in the new “copy” is the same as the existing one, the problem is in the filesystem and we (I will assist) need get in there to resolve.

If the behavior is normal again then somehow the section definition got damaged in the database. I’d then recommend deleting the damaged one and renaming the new one to take its place.

Same result.

I created a new ‘Other Videos’ library named ‘Download Test’ Pointed it at my download folder.

It detected the contents when it was created, but then i moved a few items over, and plex did not detect the new files / Changes. I then hit the ‘Scan Library Files’ and it found and added the new additions.

So, same result as my current folder.

It’s so confusing that my TV Shows, and Movies Libraries are working fine, yet this one is not. Frustrating.

I’ll repeat your test.

I don’t know if they made a change or what happened.

Tested by copying an existing.

Automatic detection of “Other Videos” works fine. There is no regression.

Therefore, there can be only two possible answers:

  1. The inotify table is full
  2. There is something wrong with the permissions (which doesn’t seem plausible)

It’s easy to confirm the inotify table isn’t having problems

  1. Verify DEBUG server logging is enabled
  2. Restart PMS
  3. Let it sit completely idle for 3-4 minutes after restart
  4. Download the Logs
  5. Examine “Plex Media Server.log”
  6. Scan through the “Now Watching” list until completion. Stop if any errors.

Upon inspecting the log file, About 85% of the way towards the bottom there’s a big chunk of ERROR’s. Pretty much in my TV Shows, Downloads Libraries.

“ERROR - [Notify] Failed to add watch for “/volume1/Media/Downloads” (28: No space left on device)”

That’s pretty much what i get, There’s a few hundred TV show episodes listed in these errors. Everything recent from my Downloads Libraries/Folders.

My NAS still has almost 15TB free space, so i’m not sure why it says no space.

Not sure what else i should be mentioning from the LOG file as there’s a lot in there i don’t understand.

Thank you again.

The Syno’s table is full.

  1. Using FileStation , for each of your media shared folders
    – Right-click → Properties → Wait for it to count files & folders
    – Write down the number of folders

  2. Add up all the folders for a grand total

  3. go through this How-To to customize the Syno so it can handle the number of folders.

MY ONLY CAUTION

If you only have 4 GB of memory in the NAS, and it’s capable of 8, be careful of how high that number should be.

If you’re adding over 1,048,576 folders – Make sure you have enough memory in the NAS
– 8GB is OK
– 4GB ? – I’d up it to 8 if you can.
– 2GB ? – Don’t increase until you add more

These ‘watch’ slots take kernel memory. If you set too high, nothing will run right / at all.

I’m currently at 62492 files, 9064 folders.

My DS920+ has been upgraded to 8GB memory, so i’m covered there.

I’m not sure what number i should be aiming towards.

As per that guide, should i also set up the scheduler to apply it on every boot?

Thank you.

Thanks for sharing the total.

I would start with 32768 as the number.
If you need to increase, increase in multiples of 32768

Why that number? 32K (binary) keeps memory aligned perfectly and doesn’t waste anything.

Please follow the guide (it sets it up to be effective at every reboot).
After you’ve applied (run) the scheduled task, restart DSM to make it effective.

1 Like

THANK YOU!

So, I did as directed, Reset the NAS, and now my Downloads folder works perfectly. It detects and lists new media as it’s being sent over from my PC. No issues.

I plan on doing another log dump and see what it says, but for now, I’m going to say solved.

Thank you so much for your time and effort helping me. There’s a less than zero percent chance i would have figured this out without your help. I really do appreciate it.

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