Jump to content

Media Scan Failing


Go to solution Solved by Luke,

Recommended Posts

Posted

Hi everyone, 

I recently had issues with scheduled tasks failing so I followed the instructions from another emby forum post which said the answer was to rebuild the db. So I renamed the original library file and set about rescanning media files. Since then the scan which had been running for about 4-5hrs froze at 86.6% for about 2 hrs and then stopped and gave a failed error message. I then tried scanning each media folder manually but kept getting scan failed error messages. Only about 1/3 of my library files are present. I attached my latest logs and screen shot the scanned media file alert from the dashboard. I'm at a loss for what to do...

error alert 1.png

error alert 2.png

embyserver.txt

Posted

Thanks for the reply Luke. I've started following the guide and am in the process of rescanning again after once again deleting the library.db file. I wasn't able to do the step in the guide to delete the library.db-shm & library.db-wal files as they would disappear when I shut down the server and weren't able to be deleted when the server was up as they were in use by the server. Right now the scan is at 95.5% so if that doesn't work I'll move on to the database integrity steps.

Posted

Let us know how you get on. Thanks.

Posted

Looks like deleting the db file and rescanning until I get a successful media scan did the trick Luke. Thanks again. I'll save this guide for next time 

Posted

Thanks for the feedback.

Carlo
Posted

Did you try the other 2 possible solutions before deleting the db file?
BTW, after your scan finishes, shut down Emby and save a copy of your DB files.

In the future if something ever happens you could put the file back, do a library scan and only scan what's changed.

Posted

@cayars Did you mean the delete the library.db-shm & library.db-wal files and ensuring the db path was correct or the integrity check? And thanks I  backed up this new db file for next time.

Carlo
Posted

Yes those 2 files.

There are 3 different things to try in that article.

1. just removing library locks
2. integrity checks and recover of database
3. renaming library.db to start fresh

The first one is the easiest to do and usually the fix for most people.

Posted

@cayars So I wasn't able to do the step in the guide to delete the library.db-shm & library.db-wal files as they would disappear when I shut down the server and weren't able to be deleted when the server was up as they were in use by the server. But I had found an earlier forum post that suggested renaming and start fresh which is what I did and what worked this time around. Thanks for following up👍

  • Thanks 1
Carlo
Posted

Sounds good.  Yes the locks SHOULD only be in place when Emby was running.  So ideally there is nothing to delete.

You could have tried the recover step as well which is what I'd suggest if you have a big library but if it's on the smaller side or can be scanned back in rather quickly going the route you went is easy.

Now that you have a rebuilt library.db file, next time you shut Emby down grab a copy of the few db files you have.  That way you never need to rebuild from scratch again as you could put one back and rescan for new/removed media!

Posted

Ohhh ok that makes sense. And yeah I've backed up all of the db files. Thanks again!

  • Like 1

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