

But it's possible you want to add a config option, or an argument to transaction.atomic(), or something of the kind.ĭiff -git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py T15:06:57.I'd like to propose a change like this, which I think would fix a class of SQLite "database is locked" problems. T15:06:57.854748391Z at (Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) T15:06:57.854673890Z at .StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) T15:06:57.854652489Z at .StateManager.SaveChangesAsync(IReadOnlyList`1 entriesToSave, CancellationToken cancellationToken) T15:06:57.854529686Z at .BatchExecutor.ExecuteAsync(DbContext _, ValueTuple`2 parameters, CancellationToken cancellationToken) T15:06:57.854455384Z at .ExecuteNonQuery(SqliteConnection connection, String commandText) T15:06:57.854292080Z at (Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) T15:06:57.854283180Z at .StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) T15:06:57.854208178Z at .StateManager.SaveChangesAsync(IReadOnlyList`1 entriesToSave, CancellationToken cancellationToken) T15:06:57.854146577Z at .BatchExecutor.ExecuteAsync(DbContext _, ValueTuple`2 parameters, CancellationToken cancellationToken) T15:06:57.854051475Z at .ExecuteNonQuery(SqliteConnection connection, String commandText) T15:06:57.853833569Z An exception occurred in the database while saving changes for context type ''.


T15:06:57.833133672Z at .ExecuteNonQuery(SqliteConnection connection, String commandText) T15:06:27.667751427Z Entity Framework Core 2.1.4 initialized 'AppDbContext' using provider '' with options: None T15:06:27.662478400Z Executing action method (InsecureSite) with arguments () - Validation state: Valid public async Task SignIn( SignInModel model). _dbContext is injected with scoped lifetime. When I call dbContext.SaveChanges(), after adding one very simple entity, the request takes about 30 seconds before throwing the following error: I have a simple asp.net core web app (v2.1), that I deployed to a B1 (and I tried B2) Azure App Service on Linux.
