cappa.dot 1 Posted May 22, 2021 Share Posted May 22, 2021 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. 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 More sharing options...
Luke 37099 Posted May 22, 2021 Share Posted May 22, 2021 Hi there, please attach the complete emby server log. thanks. Link to comment Share on other sites More sharing options...
cappa.dot 1 Posted May 22, 2021 Author Share Posted May 22, 2021 Is it this one? embyserver.txt Link to comment Share on other sites More sharing options...
cappa.dot 1 Posted May 23, 2021 Author Share Posted May 23, 2021 Morning Luke. Looking at the file it is looking like the database is locked. How should I proceed? @cayars Link to comment Share on other sites More sharing options...
cappa.dot 1 Posted May 23, 2021 Author Share Posted May 23, 2021 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 More sharing options...
Luke 37099 Posted May 23, 2021 Share Posted May 23, 2021 Let us know how you get on. Thanks. Link to comment Share on other sites More sharing options...
cappa.dot 1 Posted May 24, 2021 Author Share Posted May 24, 2021 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 More sharing options...
Luke 37099 Posted May 24, 2021 Share Posted May 24, 2021 Thanks for the feedback. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted May 25, 2021 Share Posted May 25, 2021 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 More sharing options...
maegibbons 1267 Posted May 25, 2021 Share Posted May 25, 2021 Just happened to me on Windows too with latest beta Will proceed with rebuild. Krs Mark Link to comment Share on other sites More sharing options...
Luke 37099 Posted May 25, 2021 Share Posted May 25, 2021 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 More sharing options...
maegibbons 1267 Posted May 25, 2021 Share Posted May 25, 2021 Ok will do that 1st. Krs Mark 1 Link to comment Share on other sites More sharing options...
Carlo 4330 Posted May 26, 2021 Share Posted May 26, 2021 14 hours ago, maegibbons said: Ok will do that 1st. Krs Mark How did you make out? Link to comment Share on other sites More sharing options...
cappa.dot 1 Posted May 30, 2021 Author Share Posted May 30, 2021 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 More sharing options...
Luke 37099 Posted May 31, 2021 Share Posted May 31, 2021 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 More sharing options...
cappa.dot 1 Posted June 8, 2021 Author Share Posted June 8, 2021 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 More sharing options...
Luke 37099 Posted June 8, 2021 Share Posted June 8, 2021 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 More sharing options...
Finlay 0 Posted June 8, 2021 Share Posted June 8, 2021 Thank you for taking a look embyserver.txt Link to comment Share on other sites More sharing options...
Happy2Play 8296 Posted June 8, 2021 Share Posted June 8, 2021 22 minutes ago, Finlay said: Thank you for taking a look embyserver.txt 1021.21 kB · 0 downloads You have a locked database. SQLitePCL.pretty.SQLiteException: Busy: database is locked please follow the steps in the KB for a locked database. Database Issues : Emby Link to comment Share on other sites More sharing options...
cappa.dot 1 Posted June 8, 2021 Author Share Posted June 8, 2021 @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 More sharing options...
Happy2Play 8296 Posted June 8, 2021 Share Posted June 8, 2021 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 More sharing options...
cappa.dot 1 Posted June 8, 2021 Author Share Posted June 8, 2021 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 More sharing options...
Happy2Play 8296 Posted June 9, 2021 Share Posted June 9, 2021 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 More sharing options...
cappa.dot 1 Posted June 9, 2021 Author Share Posted June 9, 2021 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 More sharing options...
Happy2Play 8296 Posted June 9, 2021 Share Posted June 9, 2021 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now