Jump to content

Library not automatically scanned even if configured so (works manual)


MacGyver27

Recommended Posts

MacGyver27

Hello,
 

One of my library stopped doing automatic scan upon media insertion.. it used to work for many months without problem. I have checked the library config and is configured to scan the library when it detects media addition. This library contains 6,002 Files in 127 Folders, could that be an issue? Once it reached certain limit it wont perform automatic scan?

Troubleshooting steps:

  • bouncing this settings
  • upgrading Emby server
  • checked logs, didnt find anything special

Not sure if clearing metadata would be of any help so didn't trigger it yet.. once I did that it was generating them couple days for that many files.. Thanks.

Thanks

image.png.55690d4135a7e945500d684bb32f548d.png

 

Docker version 25.0.4, build 1a576c5
Linux caradhras 6.1.0-17-amd64
Emby Server Version 4.8.3.0
Docker image: lscr.io/linuxserver/emby:latest

 

Link to comment
Share on other sites

Happy2Play

Providing a server log would potentially provide use with the cause but if you have inotify errors in your log on your library it will require the change above.

Link to comment
Share on other sites

And what example are we focusing on here?

Link to comment
Share on other sites

MacGyver27

Ahh sorry. Anything in `@ADV` folder. I renamed the files to be `XXXXXXXXXXXXXXXXXXXX.mp4` or `XXXXXXXXXXXXXXXXXXXX.mkv`. Thanks

Link to comment
Share on other sites

It looks like the realtime monitor did pick something up:

2024-03-14 02:27:31.597 Info LibraryMonitor: Movies.HD (/srv/media/Movies.HD) will be refreshed.

 

Link to comment
Share on other sites

MacGyver27

In the first post I say the problematic library is `@Downloads` with the path `/srv/media/.downloads`. Thanks

Link to comment
Share on other sites

Happy2Play

I will guess it is being ignored as folders that start with periods are problematic.

As your log is not showing the folder being monitored at all.

Link to comment
Share on other sites

MacGyver27

But it used to work for like a year without problem.. in linux folders with . is nothing special. Will try to create library from scratch and report back. Thanks

Link to comment
Share on other sites

Happy2Play
7 minutes ago, MacGyver27 said:

But it used to work for like a year without problem.. in linux folders with . is nothing special. Will try to create library from scratch and report back. Thanks

True but other platforms like Mac it becomes a major issue and even Synology so coding is applied to all platforms is my understanding.  But could be wrong as I am just guessing from previous topics.

So if you have a folder that does not have a preceding period do you have the same issue?

Link to comment
Share on other sites

Ah yes, that could be the problem. Please let us know if using a different name resolves it for you. Thanks.

Link to comment
Share on other sites

MacGyver27

So I tested various libraries and it stopped doing real time monitoring for all of them.. even for the one you mentioned above Movies.HD (Info LibraryMonitor: Movies.HD (/srv/media/Movies.HD) will be refreshed). I was moving a home made video file and renaming it every time between libraries of different content type (movies/mixed/videos). Neither time it was automatically recognized - I waited about 2-3 minutes every time.. Once I clicked to scan withing a second it was recognized.. Thanks!

Link to comment
Share on other sites

Happy2Play

Per your log no libraries are being monitored and there was just the one mention of Movies.HD.

How many libraries do you have?

Do they all begin with periods?

Have you tried toggling RTM off and On on each library?

But this is something specific to your setup/environment.

Example from my log.

Spoiler

2024-03-14 22:47:55.215 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\AppData\Roaming\Emby-Server\programdata\data\livetv\recordings for item 43
2024-03-14 22:47:55.216 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\AppData\Roaming\Emby-Server\programdata\data\playlists for item 42
2024-03-14 22:47:55.216 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\AppData\Roaming\Emby-Server\programdata\data\userplaylists for item 104988
2024-03-14 22:47:55.216 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Anime for item 9
2024-03-14 22:47:55.216 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\AudioBooks for item 10
2024-03-14 22:47:55.217 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Custom test Series for item 49
2024-03-14 22:47:55.217 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Documentaries (Keep) for item 47
2024-03-14 22:47:55.217 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Ebooks for item 13
2024-03-14 22:47:55.217 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Empty for item 44
2024-03-14 22:47:55.218 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\fake_movies - Emby for item 18
2024-03-14 22:47:55.218 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Features for item 14
2024-03-14 22:47:55.219 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Foreign for item 35
2024-03-14 22:47:55.219 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Kids Movies for item 26
2024-03-14 22:47:55.219 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Mixed Content testing for item 21
2024-03-14 22:47:55.219 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Movie - Embedded test for item 24
2024-03-14 22:47:55.220 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Movie Classics for item 30
2024-03-14 22:47:55.220 Info LibraryMonitor: Watching directory with new FileSystemWatcher for C:\Users\Media\Desktop\Videos\Movies - DB for item 22

 

Edited by Happy2Play
Link to comment
Share on other sites

MacGyver27
Posted (edited)

So I was testing it and only time it was automatically scanning it was when I disabled RTM for all other libraries and only `@Downloads` was configured for RTM. I tried to put back RTM for others and again it stopped doing autoscan completely for every library..

Q: How many libraries do you have?

A: 18

Q: Do they all begin with periods?

A: No, just 2 of them

Q: Have you tried toggling RTM off and On on each library?

A: Yes. I restarted Emby when I disabled for all and restarted when enabled for all. Still stopped autoscan.

OKAY, found problem. When I have enabled RTM for a library containing only 4K Movies/Series than it stops doing autoscan for all other libraries as well. When I disable autoscan for that particular library, it works for rest of the libraries.. (it had RTM configured since the beginning, but only content of the library changed)

image.png.d838a8b78f8f93f83230149583703027.png

BTW that many files because it contains some BluRay discs and those has many files inside..

Thanks!

Edited by MacGyver27
Link to comment
Share on other sites

MacGyver27

So no.. again it is stuck.. leaving RTM enabled only for the `@Downloads` library now.. will see how it behaves tomorrow. BRB

Link to comment
Share on other sites

2 hours ago, MacGyver27 said:

So no.. again it is stuck.. leaving RTM enabled only for the `@Downloads` library now.. will see how it behaves tomorrow. BRB

What exactly do you think is stuck?

Link to comment
Share on other sites

MacGyver27

It doesn't automatically scan the library when new files are added to its folders. Every time have to click for scanning to recognize new content.

Now i had RTM enabled only for the `@Downloads` library and is not doing automatic scanning..

I will provide logs from today..

Link to comment
Share on other sites

8 hours ago, MacGyver27 said:

It doesn't automatically scan the library when new files are added to its folders. Every time have to click for scanning to recognize new content.

Now i had RTM enabled only for the `@Downloads` library and is not doing automatic scanning..

I will provide logs from today..

That would be great. Thanks.

Link to comment
Share on other sites

MacGyver27
Posted (edited)

Logs: https://pbin.aronmgv.com/EI1Ii_d5G5Fv7cS3wM2p7

Now I am seeing error mentioned above:

System.IO.IOException: System.IO.IOException: The configured user limit (65536) on the number of inotify watches has been reached, or the operating system failed to allocate a required resource.

1)

root@caradhras:[~/Repos/inotify-info]: inotify-info
------------------------------------------------------------------------------
INotify Limits:
  max_queued_events    16,384
  max_user_instances   128
  max_user_watches     65,536
------------------------------------------------------------------------------
       Pid Uid        App                            Watches  Instances
   2994954 1000       jellyfin                        49,380          9
   1743597 1000       Plex Media Server               15,237          1
   3910014 1000       EmbyServer                         243          2

2)

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

3)

Enabled RTM for all libraries.

4)

oot@caradhras:[~/Repos/inotify-info]: inotify-info
------------------------------------------------------------------------------
INotify Limits:
  max_queued_events    16,384
  max_user_instances   128
  max_user_watches     524,288
------------------------------------------------------------------------------
       Pid Uid        App                            Watches  Instances
   2994954 1000       jellyfin                        64,769         16
   3910014 1000       EmbyServer                      16,177         16
   1743597 1000       Plex Media Server               15,237          1

Seems it fixed the problem! Sorry to waste your time, but this error did not appear in the first log file 😕

Thanks!

Edited by MacGyver27
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...