Open Closed

Application performance on high load. #6998


User avatar
0
mgurer created
  • ABP Framework version: v8.0.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, PostgreSQL..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Hi there.

We are using abp framework microservice template and we already have about 20 microservices. Postgresql is our db system. When there are 1000+ active users, microservices loses connection to administration db. We face db timeouts on administration db, and microservices stops responding when connection to administration db fails. We have optimized the indexes on tables so that cpu, ram etc. compsumptions seem stable on db server, still we could not fix the timeout on administration db. The index usage on db seems fine (especially on administration db), and table scan on queries almost never occur. Queries takes the advantage of indexes on tables. There are more than 500K users on identity users table. OpenIdTokens, AuditLogs, PermissionGrants tables have almost 1.5M rows (each).

Do you have any suggestions to optimize the application on high load? Especially authserver and administration services fails to respond on high load. Because the identity, saas and administration microservices and databases are core essential part of the framework, we are somehow can not figure out why this core elements stuck on high load. We are also ready to purchase a detailed technical assistance from Abp team if possible.

We will be glad for any assistance.

Thanks Murat Gürer


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This is a big topic. First, you need to find the bottleneck. You can try using some APM server like Application Insights or Elastic APM. Then analyze the slow code it could be the backend or the database, anyway narrow it down step by step.

  • User Avatar
    0
    mgurer created

    Thanks for your answer. I have already set up Elastic APM and most of the loads and errors takes place in abp's token/handle method. It seems that there is a performance issue there. I hoped you may be avare of the issue. According to my findings, all the bottlenecks seems to occur in abp's built in endpoints. For me, the proplem is that Abp's oppeniddict implementation can not handle high load. Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi mgurer

    You can set the log level to Debug and check the token/handle method logs.

    public class Program
    {
        public async static Task<int> Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
                .WriteTo.Async(c => c.Console())
                .CreateLogger();
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15