Plex Files Unavailable but they’re not missing

Nope. I woke up this morning and all the folders beginning with A-F are missing in Finder for my Movies folder.

I’ll try turning off just directory caching and see if it still happens.

Hmm - since @gmfreed suggested using automounter, everything has been solid for me but too scared to update to 15.2. I still have the conf gile running along with automounter. Will be keen to hear what others experience with similar set up to mine…otherwise configuring a TowerPC is an option but those things run hot in terms of PowerConsuption.

I also use AutoMounter, and for what it’s worth, it doesn’t seem to have anything to do with this issue (I’ve tested with and without). I’ve also upgraded to 15.2, and with the two nsmb.conf settings, it’s working just fine.

1 Like

@Anyware… I think where it helps is with the users that were reporting the SMB connection was closing from inactivity. Automounter prevents such inactivity since it’s constantly calling to it. But if for some reason macOS does close the connection, Automounter will bring it right back up.

1 Like

There are two different issues here.

One issue is keeping the volume mounted, which yes, Automounter (which I also use) works well to resolve this issue.

The second issue is files/folders missing from libraries. There seems to be an issue with Finder not seeing all the files in a library after a period of time. editing the numb.conf file and disabling directory caching resolves this issue. The downside is that browsing folders containing over 1000 items can be slower. At least they will always show up (in particular when Plex scans the library) and you won’t lose items from the library.

Sadly, I don’t think anything was resolved in 15.2.

But hey, you can create some crazy emojis! I’m glad to see that Apple has their priorities straight.

3 Likes

Spot on.

Thanks. I should have chosen my words more carefully. I meant to imply that the use of AutoMounter doesn’t seem to have anything to do with the partial directory scan problem, at least in my testing. But, I also use AutoMounter to prevent the SMB connection from disconnecting…where it is very useful.

1 Like

Exactly that - the last couple of years of MacOS updates is all about convergence with iOS. And now with the AI coming in…i left windows behind as it was getting a bit too much with all the chatGPT, Maybe switch to Linux…again!

As far this issue is concerned, i am still ok for now thanks to the nsmb.conf file and Automounter.

I’ve heard of people going back to AFS or NFS, that’s what I was thinking of doing, but ever since I started running Automount I haven’t had any issues.

I was curious about SMB performance characteristics with different configuration settings, so I ran thousands of tests this morning with a few different configurations.

For reference, these were tested on an M1 Ultra running macOS 15.2 with a 2.5Mb connection to a Synology DS1520+ NAS. I wouldn’t use them as absolute measures, though…just to give you idea about how some of these settings impact performance on a folder that averaged ~1,500 files.

  • With no nsmb.conf file present (so macOS defaults): takes ~0.3 seconds to read the file listing.
  • With the full nsmb.conf file I shared earlier: takes ~0.05 seconds. This is 6x faster than without the configuration file.
  • With the full nsmb.conf file and changing only dir_cache_off=no: takes ~0.3 seconds.
  • With only dir_cache_off=yes and mc_on=no in the nsmb.conf file (I removed all of the other values): takes ~0.05 seconds.

Based on these tests, I can’t imagine you’d ever want the directory cache enabled. Yes, that sounds backwards, and perhaps the errors we’re seeing are due to a faulty cache anyway. If/when Apple fixes these bugs, maybe caching will again become advantageous.

2 Likes

I may have found another solution as well.

The slow response in finder with the nsmb.conf file was bothering me, with 4500 folders with movies in them, it would take sometimes a minute or more for finder to open, and I had nothing better to do today so I decided to look for an alternative file explorer, to see if maybe replacing finder as default would fix our issues.

So i found ForkLift 4, its a finder replacement. I might assume any of them would work, but I went with this one.

I then found the proper code to replace finder with it fully by default.

defaults write -g NSFileViewer -string com.binarynights.ForkLift-3

Since doing so, I removed the nsmb.conf from the /etc folder. I have scanned all my drives with Forklift closed and finder not opened (technically) many times, and I have no issues at all.

Fast scans, full scans, fast response in Forklift.

So just replacing finder may seem to get around all the problems as well. I cant believe I didn’t think of trying this sooner.

Again, I missed a nuance…which is why it’s so tough to accurately talk about these issues.

With dir_cache_off=no (the macOS default), indeed, if no file listings change, there is an improvement. So, you’d see this with higher-level apps like Finder when you’re browsing around a static set of files. But as soon as anything changes, it appears to take longer for the macOS SMB implementation to rectify its cache, meaning that a request after anything changes actually takes longer when caching is enabled. Maybe I’m getting too technical for this audience…but it seems like we have some other technical folks here too, including the Plex developers themselves.

For what it’s worth, SMB operates below the level of the Finder (and Forklift), and you can cause the bad directory reading issue without involving either of them. But, I can imagine that it might provide a faster file browsing experience if that’s what you’re after.

1 Like

Im looking for my system to work well.

If you havent noticed, different people have different experiences with this issue. So im offering my fix for it, in case others are having the same issues I am having. To each his own.

If its not related to finder or any alternative, why do I now have no issues with files turning into trashcans with the nsmb.conf file removed, but before I did this I was still getting files disconnected regularly?

I do hope that you find a fix! Thank you for sharing your experiments.

The new Mac OS with the modified nsmb.conf which enables the cache seems to have restored Plex to full working status.

Hi There!

So just to confirm in order to have Smooth Performance with Plex on a Apple M Based Server running MacOS Sequoia with your files on a NAS and a SMB connection you need to do the following…

  1. Use Auto Mounter to keep a connection to the NAS

  2. Run the nsmb.config script (Maybe this isn’t necessary?)

  3. Disable Directory Caching

Thanks!

1 Like

My configuration is very similar to yours. You only need 1) AutoMounter and 2) the nsmb.conf file placed in the /etc directory (BTW, you don’t “run” it per se…you just put it there with the correct values). As for #3, directory caching is disabled by a setting in the nsmb.conf script. So, it’s really just those first two steps.

1 Like

Oh OK Got It!

Just wondering where the best place to download the nsmb.conf file from is and where exactly you copy it to?

Thanks!

You can find a link to the file in an earlier post: Plex Files Unavailable but they’re not missing - #413 by Anyware

And @gmfreed explained how to “install” it here: Plex Files Unavailable but they’re not missing - #427 by gmfreed

3 Likes