Jump to content

Scan media library failed latest 4.6.0.50


cappa.dot

Recommended Posts

@Happy2Play I've personally seen it happen one time on my own system running on Windows Server.  I've not seen it on my synology server but it's only used for testing right now.

On windows when I found the sqlite error in the log I brought up task manager and had one Emby Server running but 3 embytray.exe running. I couldn't really try to diagnose more than that as my logs were flooded with activity.  If I see this again I want to dig in looking for anything that could have just recently happened like windows events and any tasks like DVR or wake events, etc

4 hours ago, cappa.dot said:

I use the Synology schedule to shut down and startup. For years it's always managed to do this without issue. Recent updates have generated this locked DB.

It sounds like you may be the closest to reproduction at will of this issue. Could you share with me exactly how you have this setup so I could duplicate and test on my Synology?

We would greatly appreciate it!

Link to comment
Share on other sites

cappa.dot

I notice when I manually close Emby the two additional files are removed (as well as a few others) however I am not sure how this process works when Emby shutdown on its schedule. I would hope that it closes everything down that is running e.g. download station, photo station etc. I noticed it did not generate an error this morning however as I have not changed anything it must be a random occurrence that worked this time around. I will see if there is anything in the Synology logs when it shuts down that could shed any light on the applications that are being closed. I was thinking about installing the DSM7 RC client or even trying the new Emby beta to see if that would correct anything.

Link to comment
Share on other sites

cappa.dot

I can confirm that for the last few morning I've encountered database issues every morning. In addition to this when I watch a film the watch counter tick will not save and record videos I've already watched. In addition to this when several family members linked to the account watch something I no longer receive the emails to say media has started or finished that I always got notified of. I'm not sure if this leads to bigger issues with my current Emby setup? Could really do with some advice @Luke if you can give me some clues.

If I manually reboot emby I seem to regain all access again. For example ticking the watched saves and the deleting content removes the video etc.

  • Would a full uninstall and reinstall (then restore account) fix the issue?
    • Would the restore simply put the system error back on my system?
  • Should I make the leap to DSM7 RC build and try the new emby version for the DSM?
  • I have not yet done the step to use SQlite and have it go though the library.db file yet to look for issues
    • Could that fix the issues I have above?
Link to comment
Share on other sites

cappa.dot

I can confirm that for the last few morning I've encountered database issues every morning. In addition to this when I watch a film the watch counter tick will not save and record videos I've already watched. In addition to this when several family members linked to the account watch something I no longer receive the emails to say media has started or finished that I always got notified of. I'm not sure if this leads to bigger issues with my current Emby setup? Could really do with some advice @Luke if you can give me some clues.

If I manually reboot emby I seem to regain all access again. For example ticking the watched saves and the deleting content removes the video etc.

  • Would a full uninstall and reinstall (then restore account) fix the issue?
    • Would the restore simply put the system error back on my system?
  • Should I make the leap to DSM7 RC build and try the new emby version for the DSM?
  • I have not yet done the step to use SQlite and have it go though the library.db file yet to look for issues
    • Could that fix the issues I have above?

I am going to try another trick while I wait for a reply. I am going to create a scheduled shutdown of the app before the NAS shuts down to see if it copes with this better.

image.thumb.png.69c41e8c0b968940d8cb3a96a9453369.png

Link to comment
Share on other sites

cappa.dot

I can confirm @Luke that when my Synology NAS shuts down the service it does not remove the library.db-shm or the library.db-wal file. This only occurs when Emby is told to shutdown. Is there a way to schedule the shut down in Emby rather than the DSM so it shut downs and remove the temp files itself correctly?

Link to comment
Share on other sites

So that essentially means Synology is force closing it I guess. I probably wouldn't suggest doing that then. We'll look into whether or not it's possible to intercept that.

Link to comment
Share on other sites

Happy2Play

As Luke mentioned it sound like the Synology task is killing the service instead of gracefully shutting it down.

6 hours ago, cappa.dot said:

I have not yet done the step to use SQlite and have it go though the library.db file yet to look for issues

  • Could that fix the issues I have above?

 

This would have no effect as the database lock represent a previous database not being closed properly, so when the database is opened again that session can no take control of the database do to previous session shm/wal files.

 

6 hours ago, cappa.dot said:

Is there a way to schedule the shut down in Emby rather than the DSM so it shut downs and remove the temp files itself correctly?

You can script a api call to shutdown.

curl -X POST "http:// LOCALHOST or IP:8096/emby/System/Shutdown?api_key={APIKEY}" -d ""

 

Link to comment
Share on other sites

cappa.dot

Hi @Luke I wanted to update you on my last attempt to fix this locked database issue. I created a shutdown service 15 minutes before the NAS shuts down at night and a start up service 15 minutes after boot up in the morning. This was to test to see if an abrupt shutdown would cause the issues. This meant that the service could end and start with no interruptions. Unfortunately this morning I received the email form the system notification that the scan failed.

Can you suggest anything I should try next?

Link to comment
Share on other sites

On 6/15/2021 at 9:38 AM, cappa.dot said:

Hi @Luke I wanted to update you on my last attempt to fix this locked database issue. I created a shutdown service 15 minutes before the NAS shuts down at night and a start up service 15 minutes after boot up in the morning. This was to test to see if an abrupt shutdown would cause the issues. This meant that the service could end and start with no interruptions. Unfortunately this morning I received the email form the system notification that the scan failed.

Can you suggest anything I should try next?

We may have found the root cause of this so you could always try the beta channel or wait for a 4.6.4 update next week sometime.

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