Base solution for your next web application
Open Closed

Performance Issue with /AbpUserConfiguration/GetAll – Taking Over 10 Seconds #12426


User avatar
0
ips-jm created

Hi,

we're running a pretty clean and standard ASP.NET Zero 14.1 environment for internal testing purposes. Out of nowhere, we've noticed that the frontend reload time has become extremely slow — and it seems to be caused by this specific request:

INFO  2025-04-09 09:51:10,606 [154  ] c.Infrastructure.ControllerActionInvoker - Executed action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore), returned result Microsoft.AspNetCore.Mvc.JsonResult in 10032.7519ms.
INFO  2025-04-09 09:51:10,812 [154  ] rastructure.SystemTextJsonResultExecutor - Executing JsonResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2025-04-09 09:51:10,813 [154  ] c.Infrastructure.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 10240.7264ms
INFO  2025-04-09 09:51:10,813 [154  ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)'
INFO  2025-04-09 09:51:10,813 [154  ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished HTTP/2 GET https://localhost:44301/AbpUserConfiguration/GetAll?d=1744185060422 - 200 - application/json;+charset=utf-8 10379.3175ms

All other backend requests are fast, so we're confident that the issue is not related to database connectivity or general application performance.

This environment is configured to use Redis for caching, and generally everything has been running smoothly. However, we haven't found a way to enable the AbpPerRequestCache mechanism when using Redis. In the UseRedis method, we can only pass in the AbpRedisCacheOptions, but there's no way to set something like usePerRequestRedisCache: true like its mentioned in the docs.

Could this behavior be related to that? Or have you seen this kind of delay on the AbpUserConfigurationController.GetAll endpoint before?

Thanks in advance for your help!

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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

    Hi @ips-jm

    Did you define the setting mentioned under the heading in this document when calling the UseRedis method? To activate the AbpPerRequestCache mechanism, you can make the following change after loading Abp.AspNetCore.PerRequestRedisCache into your project.

    [DependsOn(typeof(AbpAspNetCorePerRequestRedisCacheModule))]
    public class AbpZeroTemplateWebCoreModule : AbpModule
    {
        //...
         public override void PreInitialize()
         {
            //...
             Configuration.Caching.UseRedis(options =>
             {
                 options.ConnectionString = _appConfiguration["Abp:RedisCache:ConnectionString"];
                 options.DatabaseId = _appConfiguration.GetValue("Abp:RedisCache:DatabaseId");
             }, usePerRequestRedisCache: true);
         }
    }
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ips-jm created

    Will check this, thanks!

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ips-jm created

    This worked, thank you! I overlooked the part for adding the "DependsOn"....

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)