Jump to content

Nvidia Shield server unsuccesful scan


prunhardt

Recommended Posts

prunhardt

I've gone through the folders containing video files and removed some .par2 files, .rar files, .idx files .xml files and clearlogo.png files.

What do you think: can they cause issues?

Edited by prunhardt
Link to comment
Share on other sites

  • 1 month later...
prunhardt

Hi,

Removing the files that don't belong in the library didn't solve the problem.

I may have found something else. My NAS is set to go into sleep mode when inactive to save power. Also, the max SMB protocol of the NAS is set to SMB3.

I changed both in the past, never go to sleep and max SMB1,  to avoid problems with communcation with the Shield, but both seem to have been reset to the default values after a NAS firmware update without me noticing it.

Setting the NAS to never go to sleep seems to have a positive effect.

The Shield recently got firmware 8.2.0 which supports SMB3 so I don't have to change that setting.

 

 

  • Like 1
Link to comment
Share on other sites

prunhardt

Unfortunately yes, the issue re-appeared this morning. I dove a bit deeper in what the issue is: the metadata are collected correctly, as are the images, but the primary image that should appear on the main page is not shown. Main issue is that the video file is not added. The library scan shows as "failed".

After a restart of Emby server all is well.

The search continues.... Haven't found a pattern yet.

Edited by prunhardt
Link to comment
Share on other sites

  • 2 weeks later...
prunhardt

Hi,

Yesterday I tried something else, after another failed scan. I removed (well, renamed) library.db on the Shield and did a new scan to build the library from scratch.

What I noticed is that the size of the old file (11,52 MB) was about twice the size of the file after rebuilding it (6,5 MB, with a few new videos added today).

Could it be that there is a lot of junk data in the file that can cause a scan failure? Should I compress it every now and then, and if so, how?

Above method seems a bit crude, although it  is easy enough, but you loose all info on what has been watched. 

Edited by prunhardt
Link to comment
Share on other sites

With Emby shut down modify the system.xml file

  <VacuumDatabaseOnStartup>false</VacuumDatabaseOnStartup>

Look for that line and change it to true.

That will do an optimize on the next start (be patient) of Emby and will turn itself back to false.

It's sort of like doing a defrag on a HDD but for the database of course.

Link to comment
Share on other sites

Anything is possible with databases.  I'm still a bit concerned with the previous foreign key constraint error that showed up.  With the new DB that should be gone now however.

How is the scanning going now?  Any problems since the rebuild?

Link to comment
Share on other sites

You may want to turn off "sleeping" on everything for a week as well to rule out any issues something like that could play.  Then if after a week things are good start setting things back.

Link to comment
Share on other sites

I don't know, it's not my setup. :)  But I think you mentioned previously the NAS was sleeping? I was just suggesting you turn off sleep mode for a bit.

Link to comment
Share on other sites

prunhardt

Hi,

A few days ago, I had another failed scan, in spite of rebuilding the library.

But, first signs of a pattern: it happened after deleting a watched video using the Emby PC client (don't know yet if that's relevant).
We don't always delete files after watching them. If we do, and that corrupts the library somehow, that could explain why scanning would run fine for a few days, and then "randomly" would fail, apparently after deleting files.

After the last failed scan, I restarted the server with the "vacuum" setting set to True. No problems since, and as a test I will not delete watched video's for now. It that holds, I will search for how to reproduce the failed scan.

But, I hope this observation helps you guys to further search for a possible cause. 

Edited by prunhardt
Link to comment
Share on other sites

prunhardt

I found the pattern:

  1. In any library delete any one series (folder and episodes) using any Emby client
  2. Do a library scan (I used the Scheduled Tasks Library Scan, to simulate what happens in reality when a scheduled library scan is done overnight)
  3. Now recreate the folder and one or more files from the series you deleted in step 1 to the same library
  4. Do a library scan again

The scan in step 4 will fail, with the symptoms as described above, at least on my machine.

Additional observations:

  1. Without the scan in step 2, everything seams to be fine, the scan in step 4 will be successful.
  2. The scan in step 4 also fails when you leave the folder in step 1, but delete all the episodes of a series in a folder.

Hope you can reproduce this on your Shield (or any other server?), and find a solution.

My Setup: Emby server on the Nvidia Shield, Clients on the Shield, PC's (web interface or Emby Theatre) and Android Phones.
Files are stored on a NAS.

 

Edited by prunhardt
Link to comment
Share on other sites

On 10/23/2020 at 1:50 PM, prunhardt said:

I found the pattern:

  1. In any library delete any one series (folder and episodes) using any Emby client
  2. Do a library scan (I used the Scheduled Tasks Library Scan, to simulate what happens in reality when a scheduled library scan is done overnight)
  3. Now recreate the folder and one or more files from the series you deleted in step 1 to the same library
  4. Do a library scan again

The scan in step 4 will fail, with the symptoms as described above, at least on my machine.

Additional observations:

  1. Without the scan in step 2, everything seams to be fine, the scan in step 4 will be successful.
  2. The scan in step 4 also fails when you leave the folder in step 1, but delete all the episodes of a series in a folder.

Hope you can reproduce this on your Shield (or any other server?), and find a solution.

My Setup: Emby server on the Nvidia Shield, Clients on the Shield, PC's (web interface or Emby Theatre) and Android Phones.
Files are stored on a NAS.

 

That's very interesting. @Happy2Play can you reproduce that?

Link to comment
Share on other sites

Happy2Play
31 minutes ago, Luke said:

That's very interesting. @Happy2Play can you reproduce that?

No unless client/server specific, my test was Windows server with local files and deleted on IOS app on iPhone 7.  The series can be seen as removed while monitoring the library in web client. Performed Scheduled task library scan.  Recreated deleted Series and episodes, performed library scan without issue.

4.5.2.0

Tested again adding share library from a different Windows system and performed same test without issue.

 

@prunhardt can you post the server log from your test.

How old is this database?

Link to comment
Share on other sites

43 minutes ago, Happy2Play said:

No unless client/server specific, my test was Windows server with local files and deleted on IOS app on iPhone 7.  The series can be seen as removed while monitoring the library in web client. Performed Scheduled task library scan.  Recreated deleted Series and episodes, performed library scan without issue.

4.5.2.0

Tested again adding share library from a different Windows system and performed same test without issue.

 

@prunhardt can you post the server log from your test.

How old is this database?

Thanks for trying.

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