An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call
When multiple requests are sent to the system at the same time,
There are 2 exceptions I received from the system
The fisrt:
Message: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
Stack trace:
System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
at async Task<TResult> Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync<TState, TResult>(TState state, Func<DbContext, TState, CancellationToken, Task<TResult>> operation, Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>> verifySucceeded, CancellationToken cancellationToken)
at async Task
The seconds: Message: Failed executing DbCommand ("4,569"ms) [Parameters=["@p4='?' (DbType = Guid), @p0='?' (Size = 40), @p5='?' (Size = 40), @p1='?' (DbType = DateTime2), @p2='?' (DbType = Boolean), @p3='?' (DbType = DateTime2), @p10='?' (DbType = Guid), @p6='?' (Size = 40), @p11='?' (Size = 40), @p7='?' (DbType = DateTime2), @p8='?' (DbType = Boolean), @p9='?' (DbType = DateTime2), @p16='?' (DbType = Guid), @p12='?' (Size = 40), @p17='?' (Size = 40), @p13='?' (DbType = DateTime2), @p14='?' (DbType = Boolean), @p15='?' (DbType = DateTime2), @p22='?' (DbType = Guid), @p18='?' (Size = 40), @p23='?' (Size = 40), @p19='?' (DbType = DateTime2), @p20='?' (DbType = Boolean), @p21='?' (DbType = DateTime2), @p28='?' (DbType = Guid), @p24='?' (Size = 40), @p29='?' (Size = 40), @p25='?' (DbType = DateTime2), @p26='?' (DbType = Boolean), @p27='?' (DbType = DateTime2), @p34='?' (DbType = Guid), @p30='?' (Size = 40), @p35='?' (Size = 40), @p31='?' (DbType = DateTime2), @p32='?' (DbType = Boolean), @p33='?' (DbType = DateTime2)"], CommandType='Text', CommandTimeout='30']" ""SET NOCOUNT ON; UPDATE [OpenIddictTokens] SET [ConcurrencyStamp] = @p0, [DeletionTime] = @p1, [IsDeleted] = @p2, [LastModificationTime] = @p3 WHERE [Id] = @p4 AND [ConcurrencyStamp] = @p5; SELECT @@ROWCOUNT;
UPDATE [OpenIddictTokens] SET [ConcurrencyStamp] = @p6, [DeletionTime] = @p7, [IsDeleted] = @p8, [LastModificationTime] = @p9 WHERE [Id] = @p10 AND [ConcurrencyStamp] = @p11; SELECT @@ROWCOUNT;
UPDATE [OpenIddictTokens] SET [ConcurrencyStamp] = @p12, [DeletionTime] = @p13, [IsDeleted] = @p14, [LastModificationTime] = @p15 WHERE [Id] = @p16 AND [ConcurrencyStamp] = @p17; SELECT @@ROWCOUNT;
UPDATE [OpenIddictTokens] SET [ConcurrencyStamp] = @p18, [DeletionTime] = @p19, [IsDeleted] = @p20, [LastModificationTime] = @p21 WHERE [Id] = @p22 AND [ConcurrencyStamp] = @p23; SELECT @@ROWCOUNT;
UPDATE [OpenIddictTokens] SET [ConcurrencyStamp] = @p24, [DeletionTime] = @p25, [IsDeleted] = @p26, [LastModificationTime] = @p27 WHERE [Id] = @p28 AND [ConcurrencyStamp] = @p29; SELECT @@ROWCOUNT;
UPDATE [OpenIddictTokens] SET [ConcurrencyStamp] = @p30, [DeletionTime] = @p31, [IsDeleted] = @p32, [LastModificationTime] = @p33 WHERE [Id] = @p34 AND [ConcurrencyStamp] = @p35; SELECT @@ROWCOUNT;"
ABP 6.0.0 EF Core UI Angular
hi
- Full exception message and stack trace if available (check the logs).
- Please share the steps and code to reproduce the problem.
We've just noticed these issues pop up also - on v8.3.2
SELECT count(*)::int
FROM "SBCLogs" AS s
WHERE s."TenantId" IS NULL
2024-10-21 21:52:50.944 +00:00 [ERR] An exception occurred while iterating over the results of a query for context type 'TVD_Holdings_Ltd.SBC.EntityFrameworkCore.SBCDbContext'.
System.InvalidOperationException: An exception has been raised that is likely due to a transient failure.
---> Npgsql.NpgsqlException (0x80004005): Exception while reading from stream
---> System.TimeoutException: Timeout during reading attempt
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
SELECT a."TenantId", a."Id", a."UserName"
FROM "AbpUsers" AS a
WHERE NOT (a."IsDeleted")
2024-10-21 21:52:50.960 +00:00 [ERR] An exception occurred while iterating over the results of a query for context type 'TVD_Holdings_Ltd.SBC.EntityFrameworkCore.SBCDbContext'.
Npgsql.PostgresException (0x80004005): 25P02: current transaction is aborted, commands ignored until end of transaction block
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
Exception data:
Severity: ERROR
SqlState: 25P02
MessageText: current transaction is aborted, commands ignored until end of transaction block
File: postgres.c
Line: 1498
Routine: exec_parse_message
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.