Open Closed

Slow initial application load #10447


User avatar
0
BOMSDevTeam created

Hello Team

I am experiencing a noticeable delay during the initial load of the application. When I open the web application, it takes a significant amount of time to render, with the first response taking approximately 20–30 seconds.

Additionally, when I click on any page or module for the first time, the response is slow.

Could you please help identify the cause and suggest ways to reduce this first-load delay?

Thanks


10 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • In an ABP Angular (separated Auth Server) solution, a 20–30s “first response” delay is almost always server cold-start + first-time caches/build steps, not Angular rendering itself. The Angular app blocks on backend calls like OIDC discovery/token and especially GET /api/abp/application-configuration (ABP must load permissions, localization resources, settings, etc.). After that, subsequent navigations become fast because the server and caches are warm.

    • Use this checklist (highest impact first) to reduce first-load and first-visit-per-module slowness:

      1. Run everything in Release mode (backend)

        • Make sure you are not deploying/running the HTTP API Host/Auth Server with Debug settings.
        • Publish with production-oriented settings (helps startup/JIT time):
          • Enable ReadyToRun (and optionally trimming/single-file depending on your constraints).
      2. Avoid expensive “run on startup” operations

        • Ensure you are not applying EF Core migrations automatically on startup in production.
        • If you seed a lot of data/permissions/localization at startup, move it to a one-time migrator or background job.
      3. Warm up the app (solve cold start)

        • If hosted on IIS/Azure/App Service/containers with scale-to-zero, the first request can easily take 20–30 seconds.
        • Use platform features such as:
          • “Always On” / keep-alive
          • app initialization/warmup pings (hit /api/abp/application-configuration once after deployment)
        • If you have multiple services (Auth Server + API Host), warm up both.
      4. Check Redis / distributed cache health & latency (if enabled)

        • ABP heavily uses caching for permissions/localization/config. If Redis is misconfigured, slow, or intermittently unavailable, the first load can degrade badly.
        • Verify Redis is reachable with low latency from both Auth Server and API Host.
        • If Redis is not stable, disable distributed cache temporarily to confirm the bottleneck.
      5. Reduce payload and work in /api/abp/application-configuration

        • First navigation triggers loading:
          • permissions (PermissionStore cache fill)
          • localization dictionaries
          • settings, features, etc.
        • If you have many localization resources or large dictionaries, this endpoint becomes heavier. Reduce unnecessary localization resource registrations/modules if possible.
      6. Angular-side: serve production build

        • For real measurement, test using ng build --configuration production (and serve the built assets), not dev server.
    • Practical way to pinpoint the exact cause (fastest confirmation):

      • Open browser DevTools → Network:
        • Identify which request takes ~20–30s (commonly: OIDC discovery/token, or application-configuration).
      • Check server logs with timing around that endpoint.

    Sources (verified)

    • https://abp.io/community/articles/wa24j28e
    • https://abp.io/docs/latest/framework/ui/angular/quick-start

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can enable debug logs to see which step/request is slow.

    https://abp.io/support/questions/8622/How-to-enable-Debug-logs-for-troubleshoot-problems

    Thanks

  • User Avatar
    0
    BOMSDevTeam created

    Hi

    I have checked in network tab.

    Thank you

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you change the log level and share the logs.txt file? https://abp.io/support/questions/8622/How-to-enable-Debug-logs-for-troubleshoot-problems

    It seems the static PNG file also takes ~2 seconds.

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    Hi

    I have shared the log files via email.

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    It seems the cache is delayed. To confirm this, you can disable Redis in your two websites

      "Redis": {
        "IsEnabled": "false",
        "Configuration": "127.0.0.1"
      }
    

    Can you also share a test username &password of https://dev.hxxxxx.com/ website?

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    [maliming] said: hi

    It seems the cache is delayed. To confirm this, you can disable Redis in your two websites

      "Redis": { 
        "IsEnabled": "false", 
        "Configuration": "127.0.0.1" 
      } 
    

    Can you also share a test username &password of https://dev.hxxxxx.com/ website?

    Thanks.

    Hi

    I have shared the latest log files via email.

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I checked your new logs. How many permission in your app?

    The logs show there are over 1600 permissions.


    Is the application also slow during local development? Or does it only become slow after deployment? What are your server specifications?


    Can you also share a test username &password of https://dev.hxxxxx.com/ website?

    I will try to reproduce it online.

    Thanks.

  • User Avatar
    0
    BOMSDevTeam created

    [maliming] said: hi

    I checked your new logs. How many permission in your app?

    The logs show there are over 1600 permissions.


    Is the application also slow during local development? Or does it only become slow after deployment?
    What are your server specifications?


    Can you also share a test username &password of https://dev.hxxxxx.com/ website?

    I will try to reproduce it online.

    Thanks.

    Hi

    I have shared the details via email.

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share here? Our Angular team may also check it.

    Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on February 17, 2026, 09:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.