Every couple of days plex library stops showing new content

Server Version#: 1.13.5.5291
Player Version#: web browser

Been using this server for a couple of years and all of a sudden for the last couple of weeks every 2 days the libraries will not show newly added content until I physical reboot the server. After the reboot on the next library scan (set for every 15 min) the new content is added to the library. I ran a check on the db and it showed as OK, I still did the db rebuild using the official plex instructions. Anyone have any ideas as to how I can fix this?

Thanks

Logs please? It’s likely you’ve exceeded the kernel’s default table size. If so, this is easily increased
Also, is the media locally mounted or remote (NAS) ?

Which logs do you need? The media is mounted via SMB /CIFS.

If you can catch it while it’s happening, Settings - Server - Help - Download logs.

Given the media is mounted SMB, I already have a suspicion… Credential expiration.

Ok I just had to reboot the server today so the next time it happens I will download the logs, as for credential expiration if that was the case wouldn’t I not be able to accesses the mounted media at all? I can still play and access the media when this happens.

depends on which processes are holding open handles.

PMS will always hold a handle to each top level directory.
The scanner is a new process being launched which needs to a new session into the smb server.

This is a windows SMB media server?

Plex server running on Ubuntu, and the SMB mounts are from a Ubuntu server also.

Then may i suggest doing it the right way? Ubuntu doesn’t include nfs-common in its distro (it should) but NFS is native to all linux boxes. It also ‘just works’.

You set it up and it’s done. I have two NAS boxes NFS mounted and the sessions never expire and I’m always running at full gigabit speed

I am new to setting up shares with linux so smb was the first thing I tried. I will setting it up with NFS instead and see if that helps.
BTW any other tips regarding linux and running plex are much appreciated.

Thanks

I think you might be correct regarding the samba shares. I noticed the server had not updated content from yesterday. I previously changed one library to nfs and kept the other on smb. When I looked at the server today I noticed it was stuck trying to scan the smb library. I manually canceled the smb library scan and it then went onto the nfs library and updated it correctly. Changing the rest of the libraries to nfs now.

Sorry I missed this. Per your request for tips, I have a small collection.

https://forums.plex.tv/tags/server-linux-tips

So it looks like it was not the SMB shares. Server is running all NFS shares and I had the issue just happen again. The server was stuck on trying to update a library, was scanning for over an hour that I noticed so probably longer. As soon as I manually cancelled the scan it went on and started updating the rest of the libraries.

Any ideas regarding this? It has happened a few times now in the last day.

Chuck will need debug logs (not verbose) from when Plex scans and finds the broken media item. Attach them and he will help you pin-point the file which needs to be removed.

I noticed it was always stuck scanning my music library so I looked through the directory and some of my folders and files had weird unreadable characters in the names. Not sure how it happened because they were not originally like that. I removed the files and folders so lets see if it works properly now.

Looks like I didn’t fix it :frowning: I did a directory count and I am over the 8192 count. I have my libraries set to “Scan my library periodically” every 15 min. Would the directory limit be an issue for me when using this scanning option?

Only if using “Update my library automatically when changes are detected”. It can’t detect more than 8192 without adjustment (that’s the default).

easily fixed.

Let’s say you want 16384 directories.

sudo sh
echo fs.inotify.max_user_watches=16384 >> /etc/sysctl.conf
sysctl -p

The value is now increased to 16384. You’ll use 540 bytes for each directory you monitor so this adds 8MB to the resident (non-swappable) size of the kernel . Usually only of concern in small memory capacity systems or when the value desired becomes excessive

That can’t be it then because I just run the scan every 15 min. I increased the directory size anyways.
The scan is timing out on multiple libraries and all I have to do is cancel the scan then the next time it scans it works. If you still need logs let me know.

Let me know if you would like debug logs.

I need logs. Can’t diagnose any further without them.

DEBUG logging only please.

Please recreate the problem

settings - server - help - download logs

Attach the ZIP

Then i’ll be able to see exactly what you’re seeing

Just had the issue happen again I went to grab the logs but noticed it said debug was disabled :frowning: I thought I had it enabled. So I enabled them and I will have to wait until it happens again I guess. Just to make sure I am enabling the correct logs I went to settings then under web client I went to debug and then enabled it.