Jump to content

RTM (inotify) doesn't seem to be working on Diskstation 7.1


Recommended Posts

Posted (edited)

So, i'm running Emby server on my DS414 on the latest 7.1 update available and everything seems to be working amazingly for the most part.

The issue is basically that real time monitoring on my library folders doesn't seem to be working.

I'm running the latest non beta version of emby server 4.10.1.0 but the same behaviour with real time monitoring was happening on the previous 4.9.5.0.

everything seems to be set up the right way:

- RTM enabled on my libraries

- i have the script running on startup setting increased inotify values:

/sbin/sysctl -w fs.inotify.max_user_watches=1048576
/sbin/sysctl -w fs.inotify.max_user_instances=4096

and checking the values from ssh returns what was set:

root@DiskStation:~# cat /proc/sys/fs/inotify/max_user_instances
4096
root@DiskStation:~# cat /proc/sys/fs/inotify/max_user_watches
1048576

- google suggested running this commad to check which processes are actually using inotify and it doesn't seem that emby is actually using it:

admin@DiskStation:~$ sudo find /proc/*/fd -lname 'anon_inode:inotify' 2>/dev/null | cut -d/ -f3 | xargs -I '{}' ps -p '{}' -o pid,comm                          PID COMMAND
    1 systemd
  PID COMMAND
10947 Plex Media Serv
  PID COMMAND
13053 synoindexscand
  PID COMMAND
15712 session_watcher
  PID COMMAND
 1850 dbus-daemon
  PID COMMAND
 1861 dbus-daemon
  PID COMMAND
 1988 syslog-ng
  PID COMMAND
 2114 systemd-udevd
  PID COMMAND
 2177 agetty
  PID COMMAND
 2786 synobackupd
  PID COMMAND
 2926 synoscheduled
  PID COMMAND
 6164 avahi-daemon
  PID COMMAND
 6888 synocrond
  PID COMMAND
 8137 crond

- logs suggest Emby is watching my media folders:

2026-10-07 16:36:41.396 Info LibraryMonitor: Watching directory with new FileSystemWatcher for /volume1/video/film for item 4
2026-10-07 16:36:48.539 Info LibraryMonitor: Watching directory with new FileSystemWatcher for /volume1/video/serie tv for item 6007

- the emby user have read/write permission on the folders and i'm pretty sure they're set correctly since it can write metadata and .jpg files to every movie folder just fine.

- Plex is able to update its library with no issue as sson as a new file is added.

- with a manual or scheduled library scan Emby picks up the new files with no issues.

 

yet Emby doesn't want to pick new files when added either automatically by radarr or manually by me.

log attached was taken on a fresh start of the emby server after a reboot of the host nas and after coping a new .mkv file to one of the monitored folders.

any help would be greatly appreciated.

 

embyserver.txt

Edited by Manp82
Tremas
Posted (edited)

Perhaps nevermind... you did mention you had a script running. 

Edited by Tremas
Posted

Yes, that’s the first thing i checked even tho i have no inotify related errors in the logs.

i had that script running on startup for god knows how long, I don’t even remember why i added it but it was already there when i noticed RTM wasn’t working.

thanks for your reply.

Posted

Are those volumes on the nas?

Posted (edited)
3 hours ago, Luke said:

Are those volumes on the nas?

Yes, volume1 is the main nas volume running on the 4 internal drives, everything is on there. 

 

Edited by Manp82
Posted

OK can you please provide a specific example of your issue?

Posted
1 hour ago, Luke said:

OK can you please provide a specific example of your issue?

so...

- i downloaded Big Buck Bunny (big_buck_bunny_720p_surround.avi.zip) from the official site using download station  to /volume1/downloads, unpacked the zip file inside the download folder and moved it to /volume1/video/film/bd/Big Buck Bunny (2008)/ which is inside the monitored folder /volume1/video/film/.

what i expect is Emby should pick up the file and add it to the library as soon as i move it to a monitored folder. instead nothing happens and the logs say nothing until a manual library scan happens (either manual or scheduled).

 

- i also tried downloading the file The_General_512kb.mp4 from here https://archive.org/details/The_General_Buster_Keaton (it's a public domain movie) from download station directly to the monitored folder /volume1/video/film/bd/The General (1927) and again Emby doesn't import the movie inside the library until the scheduled library scan happens.

 

- i also tried adding the file directly to the root of the monitored folder and various other combinations like:

/volume1/film/big_buck_bunny_720p_surround.avi
/volume1/film/Big Buck Bunny/big_buck_bunny_720p_surround.avi
/volume1/film/Big Buck Bunny (2008)/big_buck_bunny_720p_surround.avi
/volume1/film/bd/Big Buck Bunny (2008)/big_buck_bunny_720p_surround.avi

but same deal. Emby never picked the file up and never added it to the library. i'm yet to do a manual library scan.

 

- in the attached log you can probably see i have a scheduled library scan every 45 minutes.

The_General_512kb.mp4 was picked up by a scheduled library scan that happened aroud 10 minutes after the file was completely downloaded.

after this i moved scheduled library scans to every 12 hours before doing any of the tests on big_buck_bunny_720p_surround.avi so the scheduled scan wouldn't get in the way.

 

embyserver.txt

Posted

i also tried coping the file to the monitored folder via smb instead of moving files around inside the nas filesystem but same again, Emby doesn't pick up the file via real time monitoring.

doing a manual library scan later the file gets added to the library just fine.

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...