Jump to content

Scan media library failed latest 4.6.0.50


cappa.dot

Recommended Posts

cappa.dot

I have been receiving this error on my DS416play for the last week while trying the last few version of the beta and now moving to the official release. Can anyone help? Scan works on the manual scan after the install but I get this email in the morning when the system generates the email error message and every manual scan after the first. 

image.thumb.png.a8c6da08769ce1e98687ae6e322e36a0.png

Scan media library failed

Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
  at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
  at SQLitePCL.pretty.StatementImpl.MoveNext()
  at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItem(IDatabaseConnection db, BaseItem item, Int64 topParentId, Int64 userDataKeyId, IStatement insertItemStatement, IStatement updateItemStatement)
  at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItemsInTranscation(IDatabaseConnection db, List`1 tuples)
  at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, Action`1 afterSave, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Data.SqliteItemRepository.SaveItems(List`1 items, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.UpdateItems(List`1 items, BaseItem parent, ItemUpdateType updateReason, Boolean setDateLastSaved, Boolean saveMetadata, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.UpdateItems(List`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason)
  at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepository(ItemUpdateType updateReason)
  at MediaBrowser.Providers.Manager.MetadataService`2.SaveItem(MetadataResult`1 result, Boolean isFirstRefresh, LibraryOptions libraryOptions, ItemUpdateType reason, IDirectoryService directoryService, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, LibraryOptions libraryOptions, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.ValidateTopLibraryFolders(Boolean refreshMetadatas, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken)
  at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Link to comment
Share on other sites

cappa.dot

I may have fixed this by setting the watchdog folder back to an original I had. I will let you know if I still have this issue tomorrow morning once the NAS starts up again.

@cayars

Link to comment
Share on other sites

cappa.dot

Looks like everything is working fine now. I returned the watchdog episode folder back to one I had earlier and no more errors.

Link to comment
Share on other sites

Glad you got it worked out.

In case this happens to anyone else, we have added a new article to the knowledge base with a few things to do to resolve this.
https://support.emby.media/support/solutions/articles/44002210894-corrupt-database

PS I was adjusting notification settings over the weekend to stop my flood of emails and I think your "pings" got by my while I was adjusting things.  Sorry wasn't ignoring you.
Always feel free to PM me if you don't get a response in a thread.

Link to comment
Share on other sites

maegibbons

Just happened to me on Windows too with latest beta

Will proceed with rebuild.

Krs

 

Mark

Link to comment
Share on other sites

1 minute ago, maegibbons said:

Just happened to me on Windows too with latest beta

Will proceed with rebuild.

Krs

 

Mark

Actually you may not need that. You can probably just delete the database temp files as mentioned in cayar's link above.

Link to comment
Share on other sites

14 hours ago, maegibbons said:

Ok will do that 1st.

Krs

Mark

How did you make out?

Link to comment
Share on other sites

cappa.dot

Does not look like the new update works and I'm still receiving errors on the database media scan. Another side effect is that it does not show any of my actors. I have deleted the db file, tried to start a fresh and also restored from a backup with no luck. It does say on one of the line that the database is locked?

embyserver (1).txt

Link to comment
Share on other sites

3 hours ago, cappa.dot said:

Does not look like the new update works and I'm still receiving errors on the database media scan. Another side effect is that it does not show any of my actors. I have deleted the db file, tried to start a fresh and also restored from a backup with no luck. It does say on one of the line that the database is locked?

embyserver (1).txt 813.22 kB · 0 downloads

Hi, please go through the steps listed here:

https://support.emby.media/support/solutions/articles/44002210894-corrupt-database

And let us know if this resolves it for you. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
cappa.dot

Morning @Luke. I followed the steps and it continues to fail in the morning once the NAS boots up. I leave it 15 minutes before a fresh media scan in the morning and it generates the error and it sends me an email telling me of the fail. I have renamed the DB, deleted the DB and removed the two additional files with mixed results. When I run a manual scan now it is hit or miss whether it can get to 100% or not. Would you like me to send the txt file again?

Link to comment
Share on other sites

9 hours ago, cappa.dot said:

Morning @Luke. I followed the steps and it continues to fail in the morning once the NAS boots up. I leave it 15 minutes before a fresh media scan in the morning and it generates the error and it sends me an email telling me of the fail. I have renamed the DB, deleted the DB and removed the two additional files with mixed results. When I run a manual scan now it is hit or miss whether it can get to 100% or not. Would you like me to send the txt file again?

Hi, yes please that would be great, thanks.

Link to comment
Share on other sites

cappa.dot

@Happy2Play thank you for the advice. I have tried many of the things on the site to unlock the DB and it works until the next day and locks again. The only thing I did not try is the section about downloading the sqlite editor and running an integrity check. I will try that next.

Link to comment
Share on other sites

Happy2Play
1 minute ago, cappa.dot said:

@Happy2Play thank you for the advice. I have tried many of the things on the site to unlock the DB and it works until the next day and locks again. The only thing I did not try is the section about downloading the sqlite editor and running an integrity check. I will try that next.

That does not make any since as once Emby starts and has control of the database and it is locked to that session.  Now if Emby is restarting then sure this could be possible as the previous session not shutting down properly leaving a locked database.

Link to comment
Share on other sites

cappa.dot

I think he might have hit the nail on the head with the shutdown comment. My server turns off at about midnight every night and then when it starts up in the first thing in the morning I normally encounter errors. If I manually restart or shut down the server from within Emby then I don’t have these errors when I start up again. 

Link to comment
Share on other sites

Happy2Play
1 hour ago, cappa.dot said:

I think he might have hit the nail on the head with the shutdown comment. My server turns off at about midnight every night and then when it starts up in the first thing in the morning I normally encounter errors. If I manually restart or shut down the server from within Emby then I don’t have these errors when I start up again. 

How are you shutting down your server at night?

Link to comment
Share on other sites

cappa.dot

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.

Link to comment
Share on other sites

Happy2Play

@cayarsare you seeing any issue with Emby database with shutdown and startup?

@cappa.dotare you able to check and see if the database remains open (the shm and wal files remain) when your task shuts down Emby?  But I guess the question is how is the Synology task shutting down Emby?

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