Jump to content

Library scan stuck


CBers

Recommended Posts

I uploaded one on a previous post. I've attached the latest one.

 

I woudl start by removing plugins as well as your game library, then we can isolate the problem and build upwards from there.

Link to comment
Share on other sites

oldschool

OK - uninstalled all plugins, removed the games library, and restarted the server.

Edited by oldschool
Link to comment
Share on other sites

CBers

OK - uninstalled all plugins, removed the games library, and restarted the server.

And?

Link to comment
Share on other sites

oldschool

I uninstalled all the plugins and removed my games library yesterday. I expect a scan to happen only at 2:00AM, but it looks like one happened at 5:30AM taking 1 hr 8 min. I'll keep an eye on it today and let you know if I'm still experiencing full scans throughout the day.

Link to comment
Share on other sites

oldschool

Version 3.0.5597.1

I added a few videos this morning, and the realtime monitoring picked them up, but that was well before the scan.

I did add a few home videos and one photo to my home videos and photos folders. That may have been what "triggered" the scan?

 

 

server-63566380800.zip

Link to comment
Share on other sites

yes that woudl explain it. turn off the realtime monitor if you don't want this

Link to comment
Share on other sites

oldschool

I thought the realtime monitor scanned only the few things that changed and adds them to the database. I don't want the realtime monitor to trigger an entire library scan. Is that what it's supposed to do? I thought in the past that the realtime monitor would just add the new things without the full scan.

 

Honestly, I would stick to the realtime monitor if it only detected and added the new library items, and I would schedule a full scan only once a week or every other week if I could.

Edited by oldschool
Link to comment
Share on other sites

Vidman

Every scan is a "full" scan , but after your initial scan any subsequent scans will only add items added since the last scan

Link to comment
Share on other sites

oldschool

Every scan is a "full" scan , but after your initial scan any subsequent scans will only add items added since the last scan

 

Maybe knowing what's happening behind the scenes will clear up confusion. When you say "full scan", what does Emby do? Does it compare (or maybe even refresh) its metadata for every item in your library during every "full scan"? Sorry if that's sounding a little dense.

 

I think you're saying regardless of which type of scan (realtime monitor or scheduled), if it happens after the "initial scan" (and I think you mean when the server starts for the first time after a reboot or upgrade), then those scans will look through the entire folder, but it is only looking for new items that aren't part of the existing database, and will not attempt to update the database for all the other existing items in the library folder?

Link to comment
Share on other sites

oldschool

Would it be a feature request to change the realtime monitor to ONLY add new items or update changed items since the last scheduled or realtime scan? It seems like you could cut down tremendously on the time it takes to scan (from hours to minutes, and maybe even seconds). Having a daily or weekly full scan of the library is probably a good idea just in case something happened while Emby was not running, but having a partial scan would be extremely useful, and would probably resolve a lot of the problems experienced with Emby.

Link to comment
Share on other sites

oldschool

I'm confused then.

 

Vidman says every scan is a "full scan", which I would consider a compare of every library item with the database and to refresh any database entry with anything that has changed. What I was saying was to ignore the 99% of items that have a Date Modified timestamp < the last scan time and to only scan/update the things that have been added or changed since the last scan.

 

If the current functionality of the realtime monitor is to only scan new/changed items since the last scan (to include realtime monitor scans), then the scanner should not be taking 1-2 hours to scan the 1 movie that was added, unless there's something more to it that I'm missing. It looks like after adding the one item and the realitme monitor adds that one item, it's creating a job to scan the entire library, and that's where the problem lies.

Edited by oldschool
Link to comment
Share on other sites

If the current functionality of the realtime monitor is to only scan new/changed items since the last scan

 

To do exactly what you just said there is physically impossible.  You cannot "scan" only items that changed since the last scan because you need to look at everything to be able to know what changed.  The "full scan" will only refresh items that have changed since the last scan but it has to scan everything.

 

Now, I suspect when you said "scan" you actually meant refresh but I think that terminology right there is where the confusion lies.  The way the scan works now is to look at all items and only refresh the ones that have changed since the last time they were refreshed (or some other condition has occurred that means we need to refresh them).

  • Like 1
Link to comment
Share on other sites

oldschool

Can you rely on the Date modified timestamp from Windows and compare it to a timestamp in the database of the last scan? Then sort by newest to oldest, and anything newer than the database timestamp will be added/refreshed.

 

I know there are other server OS's you have to program for, but if this is calculated for you as part of the OS metadata, can't you rely on that date to calculate which items have changed? I use Windows Server 2K8 and I can sort using the Date Modified field in less than a second to see which movie was last added using windows explorer. Is that metadata available to you?

Link to comment
Share on other sites

Can you rely on the Date modified timestamp from Windows and compare it to a timestamp in the database of the last scan? Then sort by newest to oldest, and anything newer than the database timestamp will be added/refreshed.

 

I know there are other server OS's you have to program for, but if this is calculated for you as part of the OS metadata, can't you rely on that date to calculate which items have changed? I use Windows Server 2K8 and I can sort using the Date Modified field in less than a second to see which movie was last added using windows explorer. Is that metadata available to you?

 

That's what we do.

Link to comment
Share on other sites

oldschool

Then why is it taking 2 hours to scan the library when only 1 movie might be added? I can refresh the metadata of the 1 movie and it will add images and description within a few seconds. If nothing has changed in the library since the last scan (which is probably the majority of the times it is scanned), then why does it consistently take 1-2 hours for the scan to complete?

Link to comment
Share on other sites

oldschool

Do you have the server set to extract chapter images during scans maybe?

 

Yes, but the server isn't recreating those images during every scan because the timestamps are unchanged during the scans. It only extracts when it can't find metadata on the net about the movie, right?

 

I usually only use that feature for home movies on one folder. If that's what is causing the long scans, then providing an option to only create them for a certain library would be helpful, because for the most part, I only want it to create those images for home videos, or when I manually refresh data on a video that doesn't have any internet-downloadable metadata (like a workout video or a video downloaded from the internet).

Edited by oldschool
Link to comment
Share on other sites

Vidman

Well yes you can choose which media types to extract images for and also to only run as its own scheduled task ie separate to the scan

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