Jump to content

Library not updating correctly


RobsterUK

Recommended Posts

RobsterUK

Can't figure out what's going wrong here.

I have added 2 Movies today and 1 episode of a TV Show.

The files exisit and I can play them OK outside of Emby. But they do not show up in the library. I searched the logs and can see an entry for ffprobe that detects the files.
But neither movies are shown in the Emby interface. The tv episode was a replacement of an exisiting file (higher score file from Sonarr) & that has reflected in the library.

I have run a couple of manual Library scans and rebooted the Emby server. (not the NAS just restarted the Emby 'app' itself).

I attch pre & post reboot server logs.
embyserver.txt
embyserver-63740979741.txt

Edit: left out the movie names - may be useful. 'Peninsula' from this morning and 'His House' from this afternoon.

Edited by RobsterUK
Link to comment
Share on other sites

Happy2Play

All these item should only update on a library scan as your are recieving iNotify errors so RTM will not work until you patch the issue on your Synology.

System.IO.IOException: System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached

@FrostByte I don't know inotify but is there a fix for the user 128 limit vs the watches 8192 limit?  Or does one fix the other?

https://emby.media/community/index.php?/topic/90708-real-time-monitoring-seems-broken/&do=findComment&comment=939857

 

Edited by Happy2Play
Link to comment
Share on other sites

Happy2Play

Also you may need to look a recursive permissions also as that appears to be a issue also as suggested at the end of that linked topics, but inotify has to be resolved first.

Edited by Happy2Play
Link to comment
Share on other sites

RobsterUK

Thanks, I did see the inotify error and did a quick Google. But only came across modifications to .net which was a bit over my head.

But thanks for the link, I'll check it out and post back. Won't be until tomorrow though, will be watching something else tonight!

Link to comment
Share on other sites

RobsterUK

OK I have made the change to inotify_watches and added the boot up script. This has changed the upper limit. After rebooting the NAS.

admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_watches
204800

Ran another library scan and it hasn't picked up the folders.
Moved one folder out of the library path. Ran a scan. Moved it back in. Ran another scan. Still hasn't detected it.

I have tried to read through that other thread to see what else may need changing. But couldn't see anything obvious. There's so much going on there it's difficult to pick out the relevant points.
So is this a configuration issue or an issue with switching over to the .Net build?

I have only recently built this NAS and setup Emby however until yesterday all other additions to the libraries have been working fine. So I'm not sure it's a permissions issue. Checked from DSM and emby user has Read/Write permission to the folder (all folders within the library).

What is the next step?

embyserver.txt

Link to comment
Share on other sites

Happy2Play

What was added? 

2020-11-15 11:01:48.944 Info LibraryMonitor: 1_New Movies (/volume1/Movies/1_New Movies) will be refreshed.
2020-11-15 11:01:49.325 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: /var/packages/EmbyServer/target/bin/ffprobe -i file:"/volume1/Movies/1_New Movies/His House (2020)/His House 2020 WEBDL-1080p.mp4" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
2020-11-15 11:01:49.455 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0

 

If adding a item to a library that does not have spaces in its folder path do you see the same results?

Link to comment
Share on other sites

RobsterUK

I have succesfully added some items into the library this morning.
Some to a path without spaces in the library name & one into the library name that does contain spaces.

The two items I have missing from the weekend though have still not shown up. I guess there is some kind of corruption for these two entries.
I did try removing the .nfo and re-scanning the library - but the .nfo was not be re-created.

Then I moved the folder containing only the .mp4 for His House & the folder and .mkv for Peninsula to a different folder library. Ran another library scan and it has re-created the .nfo and some jpg's. But the entries are not in the library. Seems these two entries are corrupt somewhere within the database.
Have tried renaming the folders and the files and scanning again. It pulls down the .nfo and artwork but the items simply do not appear in the library.

What's goin to be the best way to address that?
Last library scan ran at approx. 11:30 with the renamed folders and files.

embyserver.txt

Link to comment
Share on other sites

RobsterUK

I'm still having issues with these two particular movies.
I have grabbed a different copy of one of them. Different file type & size.
I can see from the log that ffprobe has detected it - entry in log @ 16:14. But it still has not shown up in the library.

All other entries in the library are working but I'm unable to now add this movie. What can I do to get it display in the library correctly?
@Happy2Playare you able to offer any more advice?

embyserver.txt

Edited by RobsterUK
Link to comment
Share on other sites

Happy2Play

@FrostByte is there a separate script for instances vs watches inotify issue?

System.IO.IOException: System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached.

 

Edited by Happy2Play
  • Like 1
Link to comment
Share on other sites

FrostByte
2 minutes ago, Happy2Play said:

@FrostByte is there a separate script for instances vs watches inotify issue?


System.IO.IOException: System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached.

 

Yes, just a sec

Link to comment
Share on other sites

FrostByte
sh -c '(sleep 90 && echo 1000 > /proc/sys/fs/inotify/max_user_instances)&'

 

 

Here, add another task at boot like the other.  This will set the user instances to 1000

Edited by FrostByte
Link to comment
Share on other sites

RobsterUK

OK had to do a couple of reboot the script didn't work the first time not sure why. But got the increased limits for both settings now.

admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_instances
1000
admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_watches
8192

Ran a library scan which took a little longer than than previously which I hoped was a good sign. But the movie has still not shown up. It should be in two different library locations. Folder & filenames are different and the files are also different.
Still nothing I'm afraid.

Also can I ask is there going to be a fix for the max notify limits at some point? Just wondering how long I am going to have to have the schedules set for? I suppose these limits could potentially be reached at some point in the future.

Link to comment
Share on other sites

Happy2Play

Please post another server log.

If you did scripts for both Watches and Instances only instances is working as 8192 is default for watches.  But is currently irrelevant unless we are seeing that error in the log.

  • Like 1
Link to comment
Share on other sites

Happy2Play

Yep here is your New Movies folder failing.

2020-11-19 20:44:17.394 Error LibraryMonitor: Error in Directory watcher for: /volume1/Movies/1_New Movies
	*** Error Report ***
	Version: 4.5.2.0
	Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /volume1/Emby -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -updatepackage emby-server-synology_{version}_x86_64.spk
	Operating system: Linux version 4.4.59+ (root@build3) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25426 SMP PREEMPT Wed Jul 8 03:21:29 CST 2020
	Framework: .NET Core 3.1.7
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /volume1/Emby
	Application path: /volume1/@appstore/EmbyServer/system
	System.IO.IOException: System.IO.IOException: The configured user limit (8192) on the number of inotify watches has been reached, or the operating system failed to allocate a required resource.
	Source: 
	TargetSite: 
	No Stack Trace Available

 

Link to comment
Share on other sites

RobsterUK

Yes it does seem as though watches is still set at default.
 

admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_watches
8192
admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_instances
1000

I have the tasks set like this:
 

instances.png

watches.png

Link to comment
Share on other sites

FrostByte

type the watches in terminal

sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'

, then wait a couple of minutes and cat watches

cat /proc/sys/fs/inotify/max_user_watches

 

Link to comment
Share on other sites

RobsterUK

Once I realised that I had to run the command as root not admin it has completed sucesfully now.

root@NAS:~# cat /proc/sys/fs/inotify/max_user_watches
8192
root@NAS:~# sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'
root@NAS:~# cat /proc/sys/fs/inotify/max_user_watches                           
204800
root@NAS:~# cat /proc/sys/fs/inotify/max_user_instances
1000

Ran a library scan and it still hasn't shown up I'm afraid

embyserver.txt

Link to comment
Share on other sites

Happy2Play

Did you reboot as this is the same log as I posted the error above?

Link to comment
Share on other sites

RobsterUK

No I didn't reboot as the schedule tasks didn't seem to run correctly at boot time.
Sorry maybe I misunderstood - as FrostByte asked me to run the command directly into the terminal. I didn't think a reboot was necessary.

Link to comment
Share on other sites

RobsterUK

Thanks for your patience so far.

I have got the Schedule Tasks working correctly, with both watches and instances increased after a reboot.
 

admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_watches
204800
admin@NAS:~$ cat /proc/sys/fs/inotify/max_user_instances
1000

Just ran another library scan which took 17 mins to complete. Movie is still not showing up.

embyserver.txt

Link to comment
Share on other sites

Happy2Play

Well the errors are gone now, but the log looks normal.  Not knowing exactly how you are testing, but can you create a new folder (with no spaces in name) and create a new library, then place a few items in it.  

Other than that only other thing maybe media permission.

  • Like 1
Link to comment
Share on other sites

RobsterUK

Thanks for confirming the errors are now gone!

New media is being added OK to all exisiting libraries. Since the original post at the weekend I have added movies into paths that have & have not got spaces in the library path. They are showing up correctly.
The first thing that alerted me was that two movies did not appear in library even though the folders and files existed in the folder structure. No matter what I do to try and add these two specific movies, they are not added.

I have copied out the 'library.db' file from the share Emby\data. Used 'DB browser for SQL Lite' to open the file. The two entries for the movie are present in the 'MediaItems' table - yet they do not actually appear in the library view.
Not sure what this proves, only that the database contains the entries - yet the library is unable to display them.

 

 

Database.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...