Closed ryan-adler closed 1 month ago
I've also started experiencing this same issue with newer versions of Smtp4Dev. As a temporary fix, I manually delete the database.db file to get things working again, but within 24 hours these errors start occurring and messages stop coming in.
Failed executing DbCommand (1ms) [Parameters=[@p0='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30'] DELETE FROM "Sessions" WHERE "Id" = @p0 RETURNING 1; An exception occurred in the database while saving changes for context type 'Rnwood.Smtp4dev.Data.Smtp4devDbContext'. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'FOREIGN KEY constraint failed'. 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 Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
Our message volume is pretty low. Maybe a couple hundred per day at most.
Thanks for the excellent info on this one. This highlights a lack of tests for this so I will make sure to care of that.
Resolving in #1481
In the latest image, we are constantly receiving the following error message in the logs when queueing mails:
May be related to #1479