You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be triggered whenever SaveChanges is called. With so many threads writing to the database, we should implement an incremental backoff and wait strategy if this exception is thrown. The Polly library can help with that implementation.
Stacktrace:
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList`1 entries)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList`1 entriesToSave)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.<SaveChanges>b__107_0(DbContext _, ValueTuple`2 t)
at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
at Corgibytes.Freshli.Cli.Functionality.CacheDb.AddPackageLibYear(CachedPackageLibYear packageLibYear) in /Users/mscottford/code/freshli/freshli-cli/Corgibytes.Freshli.Cli/Functionality/CacheDb.cs:line 47
at Corgibytes.Freshli.Cli.Functionality.LibYear.ComputeLibYearForPackageActivity.Handle(IApplicationEventEngine eventClient) in /Users/mscottford/code/freshli/freshli-cli/Corgibytes.Freshli.Cli/Functionality/LibYear/ComputeLibYearForPackageActivity.cs:line 29
at Corgibytes.Freshli.Cli.Functionality.Engine.ApplicationEngine.HandleActivity(IApplicationActivity activity) in /Users/mscottford/code/freshli/freshli-cli/Corgibytes.Freshli.Cli/Functionality/Engine/ApplicationEngine.cs:line 140
The text was updated successfully, but these errors were encountered:
This can be triggered whenever
SaveChanges
is called. With so many threads writing to the database, we should implement an incremental backoff and wait strategy if this exception is thrown. The Polly library can help with that implementation.Stacktrace:
The text was updated successfully, but these errors were encountered: