Open Closed

what is the best tool to use for perfromance testing in compliaance with abp framework #7475


User avatar
0
smansuri created
  • ABP Framework version: v7.3.2
  • UI Type: Angular / MVC
  • Database System: EF Core (]MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separated
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

11 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    ABP Framework is an asp net core application. So, any tool for asp net core can be used in abp.

  • User Avatar
    0
    smansuri created

    we are looking to test angular app perfromane testing with micro service template. we are using jmeter for that. but we are facing few issues related to refresh token url connect/token and getting errors invalid token. if you have any blog or documentation for that or any other tool abp might have already used for your own product testing please suggest.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    but we are facing few issues related to refresh token url connect/token and getting errors invalid token.

    Can you share the error logs(Logs.txt)?

    liming.ma@volosoft.com

    Thanks.

  • User Avatar
    0
    smansuri created

    while doin performace testing on register page if another user in the application ties to login getting below error.

    [07:05:10 ERR] ---------- RemoteServiceErrorInfo ----------
    {
      "code": null,
      "message": "An internal error occurred during your request!",
      "details": null,
      "data": {
        "ActivatorChain": "λ:Volo.Saas.EntityFrameworkCore.ISaasDbContext -> G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext, G1.health.SaasService.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
      },
      "validationErrors": null
    }
    
    [07:05:10 ERR] An exception was thrown while activating λ:Volo.Saas.EntityFrameworkCore.ISaasDbContext -> G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext, G1.health.SaasService.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].
    Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Volo.Saas.EntityFrameworkCore.ISaasDbContext -> G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext, G1.health.SaasService.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].
     ---> MySqlConnector.MySqlException (0x80004005): Too many connections
       at MySqlConnector.Core.ServerSession.ConnectAsync(ConnectionSettings cs, MySqlConnection connection, Int32 startTickCount, ILoadBalancer loadBalancer, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 604
       at MySqlConnector.Core.ConnectionPool.ConnectSessionAsync(MySqlConnection connection, String logMessage, Int32 startTickCount, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 468
       at MySqlConnector.Core.ConnectionPool.ConnectSessionAsync(MySqlConnection connection, String logMessage, Int32 startTickCount, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 468
       at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 130
       at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 130
       at MySqlConnector.MySqlConnection.CreateSessionAsync(ConnectionPool pool, Int32 startTickCount, Activity activity, Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 966
       at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 457
       at MySqlConnector.MySqlConnection.Open() in /_/src/MySqlConnector/MySqlConnection.cs:line 382
       at Microsoft.EntityFrameworkCore.ServerVersion.AutoDetect(String connectionString)
       at Volo.Abp.EntityFrameworkCore.AbpDbContextConfigurationContextMySQLExtensions.UseMySQL(AbpDbContextConfigurationContext context, Action`1 mySQLOptionsAction)
       at G1.health.SaasService.EntityFrameworkCore.SaasServiceEntityFrameworkCoreModule.<>c.<ConfigureServices>b__1_2(AbpDbContextConfigurationContext`1 c) in /src/services/saas/src/G1.health.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceEntityFrameworkCoreModule.cs:line 42
       at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Configure[TDbContext](AbpDbContextOptions options, AbpDbContextConfigurationContext`1 context)
       at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Create[TDbContext](IServiceProvider serviceProvider)
       at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
       at Autofac.Core.Activators.Delegate.DelegateActivator.&lt;ConfigurePipeline&gt;b__2_0(ResolveRequestContext ctxt, Action`1 next)
       at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
       at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
       --- End of inner exception stack trace ---
       at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
       at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
       at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
       at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
       at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
       at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
       at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
       at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
       at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork)
       at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString)
       at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.GetDbContextAsync()
       at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`2.GetDbSetAsync()
       at Volo.Saas.EntityFrameworkCore.EfCoreTenantRepository.FindByNameAsync(String name, Boolean includeDetails, CancellationToken cancellationToken)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Volo.Saas.Tenants.TenantStore.GetCacheItemAsync(Nullable`1 id, String name)
       at Volo.Saas.Tenants.TenantStore.FindAsync(String name)
       at Pages.Abp.MultiTenancy.AbpTenantAppService.FindTenantByNameAsync(String name)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
       at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
       at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
       at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
       at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
       at Pages.Abp.MultiTenancy.AbpTenantController.FindTenantByNameAsync(String name)
       at lambda_method2221(Closure, Object)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    [07:05:10 ERR] ---------- Exception Data ----------
    ActivatorChain = λ:Volo.Saas.EntityFrameworkCore.ISaasDbContext -> G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[G1.health.SaasService.EntityFrameworkCore.SaasServiceDbContext, G1.health.SaasService.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
    
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    MySqlConnector.MySqlException (0x80004005): Too many connections

    This seems a database problem.

  • User Avatar
    0
    smansuri created

    No this can happen due to not closing connection at abp.io framework side. Why abp is not using connection pool and why its creating so many connections.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    abp will create an EF Core DbContext in every unit of work and will not use the DbContext pool.

    https://docs.abp.io/en/abp/latest/Unit-Of-Work

  • User Avatar
    0
    smansuri created

    so how does abp handles large number of connections in this case. it will crash the aplications

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    This actually is not abp problem

    eg: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1778#issuecomment-1679792537

  • User Avatar
    0
    smansuri created

    I think the way abp famework handles the connection open and close without using pooling is the problem. as we just implemented simple transaction and if 50 users try to register it is throwing the above error which not right.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can change the MySQL setting and try again.

    https://dev.mysql.com/doc/refman/8.4/en/too-many-connections.html https://stackoverflow.com/questions/19822558/how-to-set-max-connections-in-mysql-programmatically
    https://www.ionos.com/digitalguide/websites/web-development/solve-mysqlmariadb-too-many-connections-error/

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15