Base solution for your next web application
Open Closed

Timeout errors on queries to abp tables #11967


User avatar
0
mpineiro created

Dear friends, for several days now we have been experiencing errors in queries to the abp tables, we see that many of them are not performant and what happens is that they end up with timeout errors. Is there any improvement to address this type of problems? ERROR|2024-04-19 17:36:38,542|39 |Command |Failed executing DbCommand (0ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__CurrentTenantId_1='?' (DbType = Int32), @__tenantId_1='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']SELECT [a].[Id], [a].[CreationTime], [a].[CreatorUserId], [a].[LastModificationTime], [a].[LastModifierUserId], [a].[Name], [a].[TenantId], [a].[UserId], [a].[Value]FROM [AbpSettings] AS [a]WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([a].[TenantId] = @__ef_filter__CurrentTenantId_1)) AND ([a].[UserId] IS NULL AND ([a].[TenantId] = @__tenantId_1))ERROR|2024-04-19 17:36:38,542|78 |Command |Failed executing DbCommand (80,493ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__tenancyName_0='?' (Size = 64)], CommandType='Text', CommandTimeout='30']SELECT TOP(1) [a].[Id], [a].[Ciudad], [a].[CodigoPostal], [a].[Comuna], [a].[CondicionIva], [a].[ConnectionString], [a].[ContactoApellido], [a].[ContactoCargo], [a].[ContactoMail], [a].[ContactoNombre], [a].[CreationTime], [a].[CreatorUserId], [a].[CustomCssId], [a].[DeleterUserId], [a].[DeletionTime], [a].[DocumentoFiscal], [a].[Domicilio], [a].[DomicilioFiscal], [a].[EditionId], [a].[EsPep], [a].[GranContribuyente], [a].[IsActive], [a].[IsDeleted], [a].[IsInTrialPeriod], [a].[IsTemplate], [a].[LastModificationTime], [a].[LastModifierUserId], [a].[LogoFileType], [a].[LogoId], [a].[Mail], [a].[Moneda], [a].[Name], [a].[Pais], [a].[Provincia], [a].[RazonSocial], [a].[Sector], [a].[SubscriptionEndDateUtc], [a].[SubscriptionPaymentType], [a].[Telefono], [a].[TenancyName], [a].[Web]FROM [AbpTenants] AS [a]WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([a].[IsDeleted] <> CAST(1 AS bit))) AND ([a].[TenancyName] = @__tenancyName_0)ERROR|2024-04-19 17:36:38,542|32 |Command |Failed executing DbCommand (80,445ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']SELECT TOP(1) [a].[Id], [a].[Ciudad], [a].[CodigoPostal], [a].[Comuna], [a].[CondicionIva], [a].[ConnectionString], [a].[ContactoApellido], [a].[ContactoCargo], [a].[ContactoMail], [a].[ContactoNombre], [a].[CreationTime], [a].[CreatorUserId], [a].[CustomCssId], [a].[DeleterUserId], [a].[DeletionTime], [a].[DocumentoFiscal], [a].[Domicilio], [a].[DomicilioFiscal], [a].[EditionId], [a].[EsPep], [a].[GranContribuyente], [a].[IsActive], [a].[IsDeleted], [a].[IsInTrialPeriod], [a].[IsTemplate], [a].[LastModificationTime], [a].[LastModifierUserId], [a].[LogoFileType], [a].[LogoId], [a].[Mail], [a].[Moneda], [a].[Name], [a].[Pais], [a].[Provincia], [a].[RazonSocial], [a].[Sector], [a].[SubscriptionEndDateUtc], [a].[SubscriptionPaymentType], [a].[Telefono], [a].[TenancyName], [a].[Web]FROM [AbpTenants] AS [a]WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([a].[IsDeleted] <> CAST(1 AS bit))) AND ([a].[Id] = @__p_0)ERROR|2024-04-19 17:36:38,835|155 |Command |Failed executing DbCommand (0ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__CurrentTenantId_2='?' (DbType = Int32), @__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']SELECT TOP(1) [a].[Id], [a].[AccessFailedCount], [a].[AuthenticationSource], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[CreatorUserId], [a].[DeleterUserId], [a].[DeletionTime], [a].[EmailAddress], [a].[EmailConfirmationCode], [a].[GoogleAuthenticatorKey], [a].[IsActive], [a].[IsDeleted], [a].[IsEmailConfirmed], [a].[IsExternalUser], [a].[IsLockoutEnabled], [a].[IsPhoneNumberConfirmed], [a].[IsTwoFactorEnabled], [a].[LastModificationTime], [a].[LastModifierUserId], [a].[LockoutEndDateUtc], [a].[Name], [a].[NormalizedEmailAddress], [a].[NormalizedUserName], [a].[Password], [a].[PasswordResetCode], [a].[PhoneNumber], [a].[ProfilePictureId], [a].[SecurityStamp], [a].[ShouldChangePasswordOnNextLogin], [a].[SignInToken], [a].[SignInTokenExpireTimeUtc], [a].[Surname], [a].[TenantId], [a].[UserName]FROM [AbpUsers] AS [a]WHERE (((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([a].[IsDeleted] <> CAST(1 AS bit))) AND ((@__ef_filter__p_1 = CAST(1 AS bit)) OR ([a].[TenantId] = @__ef_filter__CurrentTenantId_2))) AND ([a].[Id] = @__p_0)ERROR|2024-04-19 17:36:38,982|123 |Command |Failed executing DbCommand (0ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__ef_filter__p_1='?' (DbType = Boolean), @__ef_filter__CurrentTenantId_2='?' (DbType = Int32), @__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']SELECT TOP(1) [a].[Id], [a].[AccessFailedCount], [a].[AuthenticationSource], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[CreatorUserId], [a].[DeleterUserId], [a].[DeletionTime], [a].[EmailAddress], [a].[EmailConfirmationCode], [a].[GoogleAuthenticatorKey], [a].[IsActive], [a].[IsDeleted], [a].[IsEmailConfirmed], [a].[IsExternalUser], [a].[IsLockoutEnabled], [a].[IsPhoneNumberConfirmed], [a].[IsTwoFactorEnabled], [a].[LastModificationTime], [a].[LastModifierUserId], [a].[LockoutEndDateUtc], [a].[Name], [a].[NormalizedEmailAddress], [a].[NormalizedUserName], [a].[Password], [a].[PasswordResetCode], [a].[PhoneNumber], [a].[ProfilePictureId], [a].[SecurityStamp], [a].[ShouldChangePasswordOnNextLogin], [a].[SignInToken], [a].[SignInTokenExpireTimeUtc], [a].[Surname], [a].[TenantId], [a].[UserName]FROM [AbpUsers] AS [a]WHERE (((@__ef_filter__p_0 = CAST(1 AS bit)) OR ([a].[IsDeleted] <> CAST(1 AS bit))) AND ((@__ef_filter__p_1 = CAST(1 AS bit)) OR ([a].[TenantId] = @__ef_filter__CurrentTenantId_2))) AND ([a].[Id] = @__p_0)ERROR|2024-04-19 17:36:39,145|39 |Query |An exception occurred while iterating over the results of a query for context type 'Worldsys.Compliance.EntityFrameworkCore.ComplianceDbContext'.System.Threading.Tasks.TaskCanceledException: A task was canceled.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mpineiro

    Could you share your Abp NuGet package version you are using in your project ?

  • User Avatar
    0
    mpineiro created

    Hello, we are currently using version 6.3.0 We are in parallel carrying out a migration to the latest versions, but we are uncertain if these problems would be resolved or we will face the same situation.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mpineiro

    We have made several enhancements after 6.3 version. One of these was related to AbpUserTokens table usage optimization and other one was related to UnitOfWork interception. I assume updating your Abp packages to latest version will solve this issue.