Jump to content

Library Scan hanging at 27%. Normal?


Marco3G

Recommended Posts

Marco3G

Hi everyone

I just isntalled Emby on a Ubuntu 22.04 server VM (4CPUs x Xeon(R) CPU E5-2695 v2 @ 2.40GHz and 4 GB RAM). I already have a bunch of movies I can click and watch but neither music nor tv shows is being populated. I've had the library scan hang at 27% for several hours.

 

I restarted the server and retried the scan. It quickly jumped to 27% and now has been there for another 20 minutes.

2024-03-06 17:02:41.331 Info TaskManager: Executing Scan media library

Now I get it, I have about 8TB of media to scan and I'm prepared for that to take a while. But it's also not like anything is getting populated. TV shows and music remains completely empty, CPU and network on the VM is on vacation and not even media images are being populated.

The moment I play a movie, it gets a cover but that is all the progress I am seeing.

Is it possible emby is having issues with file access? I have mounted the folders in from TrueNAS via NFS. I created a local group with the same GID as on TrueNAS and added the emby user to it. The shares are read only.

Is this normal? Do you have an idea if I might have configured something wrong?

 

 

embyserver.txt

Edited by Marco3G
Link to comment
Share on other sites

adminExitium

We will need to see the debug-level logs for the server to help further since these info-level logs have very little info.

Debug logging can be enabled under Logs->Settings->Enable debug logging and then a server restart.

Link to comment
Share on other sites

Marco3G

Could have thought of that, after all I did the same for Jellyfin...

It hasn't run all that long but here's the log.

I can see several movies listed but not one TV show or music title.

embyserver(1).txt

Link to comment
Share on other sites

pwhodges

(1) The percentages are very far from linear, as in much software.  But having to leave it overnight would not surprise me for that size of library.

(2) The options for marking openings during the scan (for intro-skipping) and for generating thumbnails (for when scrolling the video) are both extremely intensive; it's best to leave them set to operate only on a schedule during the initial scan.

(3) The naming rules in Emby are not the same as in either Jellyfin or Plex.  While many names are accepted by all three, the common belief that files that work in one will necessarily work in another is unfounded.  I'm not sure how much this would impact the speed of scanning, though.

https://emby.media/support/articles/Movie-Naming.html

https://emby.media/support/articles/TV-Naming.html

are the places to check.

Paul

Link to comment
Share on other sites

Marco3G

Point 2 is very interesting to me. I'll have to find those settings for I don't really see an immediate need right now for those and could save that work.

I expect that some of the files will not be named perfectly but must of the stuff has been worked over with either tvnamer or FileBot. I would hope that some start trickling in at some point...

Link to comment
Share on other sites

jaycedk

If you think its stuck, look at the logs.

In ubuntu you could try 

tail -f location_of_log_file

That should show you log live updates. 

Link to comment
Share on other sites

Marco3G
2 minutes ago, jaycedk said:

If you think its stuck, look at the logs.

In ubuntu you could try 

tail -f location_of_log_file

That should show you log live updates. 

I mostly see my activity on the web interface. Right now I'm doing absolutely nothing and the tail has not budged in three minutes. Will keep an eye on it.

Link to comment
Share on other sites

Marco3G

Just a thought: Is there some option I have to look out that would try to write to the media folders? Because I mounted them RO it might explain why it can't continue. Granted, I would expect access denied lines in the embyserver.txt

It's been running for 10 minutes now with tail -f not budging even a single line.

Link to comment
Share on other sites

Right you would see access denied.

Link to comment
Share on other sites

Marco3G

Well, it's half an hour with no activity now. I think it's safe to say that it's dead :D

Link to comment
Share on other sites

If you click stop on the scan, what happens?

Link to comment
Share on other sites

Marco3G
Posted (edited)

So far I've never had the patience to wait for anything happening. It stayed on "stopping".

I can try to give it more time at one point but meanwhile I removed the movies library from emby because it was stuck at 98% during all of this.

It is now scanning tv shows. Although it LOOKS like it is not stuck at 40.6 percent, embyserver.txt is in fact working on scanning.

We'll have to see whether it finishes and goes on to music. If it does, we'll have to find out what movie trips it up. If it doesn't, back to square one I guess.

A little excerpt:

2024-03-06 20:18:16.838 Debug MediaProbeManager: ProcessRun 'ffprobe' Started.
2024-03-06 20:18:16.935 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded
2024-03-06 20:18:16.936 Debug App: Running EpisodeNfoProvider for /mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv
2024-03-06 20:18:16.936 Debug App: EpisodeNfoProvider returned no metadata for /mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv
2024-03-06 20:18:16.936 Debug App: Running TvdbEpisodeProvider for /mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv
2024-03-06 20:18:16.936 Debug App: TvdbEpisodeProvider returned no metadata for /mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv
2024-03-06 20:18:16.936 Debug App: Running TvdbEpisodeImageProvider for /mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv
2024-03-06 20:18:16.936 Debug App: Running VideoImageProvider for /mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv
2024-03-06 20:18:16.937 Info QuickSingleImageExtractor: ProcessRun 'quick-extract-image' Execute: /opt/emby-server/bin/ffmpeg -skip_list 148 -f matroska -threads 1 -copyts -i file:"/mnt/Media/Serien/Cat's Eye/Season 2/Cat's Eye - [02x36] - First chance.mkv" -an -sn -update 1 -vf "scale=trunc(min(max(iw\,ih*dar)\,600)/2)*2:trunc(ow/dar/2)*2,thumbnail=24" -vsync 0 -f image2 "/var/lib/emby/cache/temp/ca3e1a70-9168-4fc1-a877-4305eed56093.jpg"
2024-03-06 20:18:16.937 Debug QuickSingleImageExtractor: ProcessRun 'quick-extract-image' Started.

Edited by Marco3G
Link to comment
Share on other sites

Marco3G

And again there came a point where for several minutes nothing happened in the log.

So I re-added the movies library. The software then decided to cancel the scan at 20:43:39. More than fifteen minutes later, the scheduled task is still "stopping".

 

embyserver(2).txt

Link to comment
Share on other sites

adminExitium

I would say to just leave it alone for a few hours, if not overnight. Even if it seems stuck, it may be doing DB operations that are not logged.

  • Agree 1
Link to comment
Share on other sites

Marco3G
Posted (edited)
9 hours ago, adminExitium said:

I would say to just leave it alone for a few hours, if not overnight. Even if it seems stuck, it may be doing DB operations that are not logged.

Well, the scan is still on "stopping" So no. The process is not healthy at all. Waiting the night did not lead it to heal itself.

 

I hate to say it, but either something about my environment is so weird that it trips it up or this thing needs better error handling.

Look at the logs. After midnigt until shortly after 7 there isn't even a logfile to download. And quite frankly I don't know what the entries after 7 were. I started browsing the settings page at 7:35 and from my experience, that doesn't leave debug entries as opposed to browsing the user interface itself.

 

Current status is all the movies are gone again due to my removing the library and I see four tv shows of about 130.

embyserver-63845366400.txt embyserver(3).txt

Edited by Marco3G
Link to comment
Share on other sites

Marco3G

I may have to correct one observation. Under Latest Shows are only four as I think I observed earlier. I actually have a full list of TV shows if I click on that category. The covers are being populated it seems. I see permanent activity in the log. Again, this is after restarting the server this morning because the scanning process was still "stopping".

Link to comment
Share on other sites

adminExitium

My earlier comment was regarding the scanning, not the stopping btw. You may have hit some edge case by doing multiples scans and stops which caused it to freeze.

If you have restarted the server and started a scan, I would just leave it alone for a few hours/overnight as long as it's doing some activity. The percentage may seem deceptive because Emby does most of the actual metadata download only at the last few percentages so those may take significantly longer to increase.

Link to comment
Share on other sites

Marco3G

That would make sense. The tv shows library is staying at 92% and populating the covers right now.

 

Do understand though that this situation is different than it was for movies. That too stayed at like 90ish percent with the overall process" hanging" at 27% but it did not populate anything unless I clicked on it.

The logs were not showing any activity as they are now.

 

I will try to let this finish and see whether it then continues with either movies or music.

  • Thanks 1
Link to comment
Share on other sites

Let us know how you get on. Thanks.

Link to comment
Share on other sites

Marco3G

Well it ran over night and I think all I'm now seeing is my activity on the web interface.

Overall scan yet again hangs at 27.7% since yesterday.

embyserver(4).txt

Link to comment
Share on other sites

Marco3G

Jellyfin has its media scan hanging at 96% since forever.

I think there may be some file somewhere that both have major issues with. How do I find it?

Link to comment
Share on other sites

jaycedk

That is hard to say.

But I would try adding movies, 10 at a time.

And see where it gets stuck.

If its 1 of then 10 just added then you have narrowed it down to 1 of them.

Link to comment
Share on other sites

Marco3G

I am not sure how I would do that other than physically moving them. With 2 TB that's gonna take a moment :D

 

That being said, I tried something else. I openes SMB in my firewall and instead of giving emby a local mount to work with I pointed it to that SMB share. Movies has been successfully indexed and TV shows is work in progress and it seems to be actually progressing.

So simple answer is I must have goofed something up with NFS. For the life of me I cannot fathom what, though.

I will try to check permissions and see whether there is an element that may be borked. However even if that was the case, I'd expect any software to just skip the element with an error rather than get stuck...

Link to comment
Share on other sites

jaycedk

Yes that is usually in the logs, as permission denied.

I don't think I saw that in you logs.

I might be wrong.

Happy to here you are having some progress 👍

Link to comment
Share on other sites

Marco3G

Indeed. I can probably just swith over to using SMB but it doesn't sit well with me that NFS is broken, especially since I cannot fathom how.

 

I went and checked permissions and I can't find anything wrong.... which worries me.

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