Hola,
tenemos una aplicación corriendo en Net Zero con ABP y sobre una infraestructura de Docker en Azure bajo base de datos SQL Server también del Elastic Pool de Azure. Lo que observamos es que cada x tiempo, el consumo de CPU se mantiene en un nivel determinado, que no llega al límite para nada, en ese momento se genera el corte, luego de algunos minutos, cae el consumo de CPU de golpe y el sitio vuelve a responder.
Es un comportamiento muy extraño.
Les agradezco la ayuda que me puedan brindar.
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.
Hello, I would like to know if you have a service to upgrade our current version of ASP. NET ZERO and ABP. Our current versions are: 10.3.0 -> Asp Net Zero 6.3 -> Abp
If you have a service of this type, I ask for costs and times for said upgrade.
Thank you so much I await your response soon Greetings
Setup Details: Product version: v10.3.0 Product type: ASP.NET CORE & Angular ABP Framework version: 6.3.0
First off, I'd like to provide some context about our project. Before our recent changes, we had our ASP.NET Zero project deployed on a Windows server. However, we've recently decided to modernize our stack, dockerizing the application and migrating it to Azure. Alongside Docker, we're also utilizing Kubernetes for container orchestration. In addition, we've integrated Redis, which runs without any hitches.
The main challenge we're facing relates to real-time notifications using SignalR. When we test the functionality directly from the frontend through a button that triggers an endpoint in our backend, the notifications are generated and received in real-time regardless of the number of backend instances in operation.
However, we've encountered an issue with another flow within our system. We have a worker setup for background jobs that, upon completing certain processes, sends a request to the backend to generate and dispatch a notification. While the notification gets correctly generated in the database, we've noticed inconsistencies in its delivery via SignalR when initiated from the worker. This specific problem only arises in the flow between the worker and the backend when we operate with multiple backend instances. We're wondering if this issue might be tied to backend cache or session management, which could potentially impact notification transmission. Could sessions or cache be interfering?
Has anyone encountered similar challenges or has suggestions on how to approach this?
Any guidance or assistance would be greatly appreciated. Thank you.
Hello,
I wanted to know if to generate a microservice with ASP.NET ZERO, I need to have all the structure of ABP ZERO in my code. If you have a simple example, it would be very helpful.
Thank you so much Greetings
In my web application, the following query throws an error and causes my application to stop seeing the database server, which causes me to have to restart my application server. Then I put the whole log so you can analyze the case:
ERROR 2023-03-17 12:38:00,638 [210 ] oft.EntityFrameworkCore.Database.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 2023-03-17 12:38:00,639 [210 ] Microsoft.EntityFrameworkCore.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.
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.SingleQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func
4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable
1.AsyncEnumerator.MoveNextAsync()
System.Threading.Tasks.TaskCanceledException: A task was canceled.
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.SingleQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func
4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable
1.AsyncEnumerator.MoveNextAsync()
ERROR 2023-03-17 12:38:10,144 [142 ] .EntityFrameworkCore.Database.Connection - An error occurred using the connection to database 'ComplianceProd' on server 'xxx.xx.xxx.xxx'.
ERROR 2023-03-17 12:38:10,144 [204 ] .EntityFrameworkCore.Database.Connection - An error occurred using the connection to database 'ComplianceProd' on server 'xxx.xx.xxx.xxx'.
Where I put the x, is our database server IP
I would appreciate any help you can give me.
El problema que se describe a continuación está generando caídas constantes en la plataforma, necesitamso por favor nos guíen en la solución. Como podemos abordar este problema de múltiples conexiones abiertas?
Se observan cada tanto muchisimos queries del estilo
/* Params ( @__ef_filter__p_0 BIT ,@__ef_filter__CurrentTenantId_1 INT ,@__p_0 BIGINT ) */
SELECT [a].[Id] ,[a].[ExpireDate] ,[a].[LoginProvider] ,[a].[Name] ,[a].[TenantId] ,[a].[UserId] ,[a].[Value] FROM [AbpUserTokens] AS [a] WHERE ( (@__ef_filter__p_0 = CAST(1 AS BIT)) OR ([a].[TenantId] = @__ef_filter__CurrentTenantId_1) ) AND ([a].[UserId] = @__p_0)
Estas conexiones quedan en sleeping pero con transaccion abierta.O sea no haciendo nada del lado del SQL pero con transaccion abierta.
Similar tambien con
( @p0 DATETIME2(7) ,@p1 NVARCHAR(128) ,@p2 NVARCHAR(128) ,@p3 INT ,@p4 BIGINT ,@p5 NVARCHAR(512) )
SET NOCOUNT ON;
INSERT INTO [AbpUserTokens] ( [ExpireDate] ,[LoginProvider] ,[Name] ,[TenantId] ,[UserId] ,[Value] ) VALUES ( @p0 ,@p1 ,@p2 ,@p3 ,@p4 ,@p5 );
SELECT [Id] FROM [AbpUserTokens] WHERE @@ROWCOUNT = 1 AND [Id] = scope_identity();
Pueden estar mas de 10 minutos en sleeping. Probablemente sea la transaccion con ese Nombre.Probablemente asignado por Entity Framework. De cualquier forma hay algun problema con el manejo de los AbpUserTokens.