authentik icon indicating copy to clipboard operation
authentik copied to clipboard

Slow loading of login UI

Open rizwan95 opened this issue 1 year ago • 8 comments

Describe the bug The loading of the login UI is very slow. Can we defer the loading of unnecessary JS and resource files?

  • authentik version: 2024.2
  • Deployment: docker-compose

rizwan95 avatar Aug 03 '24 06:08 rizwan95

also 2024.6.2 has regression - dark theme has white background on login page image

mmospanenko avatar Aug 04 '24 20:08 mmospanenko

The admin UI is pretty slow too. It's taking upwards of a minute to load for me, and it isn't the connection nor the server nor the client since other apps hosted by the same server accessed by the same client over the same connection load instantly.

seaglade avatar Aug 14 '24 18:08 seaglade

ME TOO

student-jie1 avatar Aug 20 '24 06:08 student-jie1

Profiling this with Firefox's Developer Tools shows that there is a phase that only ends when the page is manually reloaded where a DocumentLoad occurs (taking 35 seconds, yikes) but no Paint ever seems to fire, causing a RefreshDriver tick to hang (with the status "waiting for paint"). There is also a hanging SetStyleNeedFlush. I hope this issue gets some more attention because my instance is barely usable at the moment.

seaglade avatar Sep 10 '24 15:09 seaglade

@KiARC what hardware is your authentik instance running on? It is very odd that the document load takes that long (since that itself has very little logic, usually the API requests the frontend makes take the most time)

BeryJu avatar Oct 17 '24 16:10 BeryJu

My instance is a docker container inside of a Proxmox VM on a refurbished HP Z640 Workstation. That shouldn't be an issue, especially since tons of other services run perfectly fine (including OneDev which is presumably at least as heavy as Authentik). Authentik is the only service with this issue among dozens of different services.

seaglade avatar Oct 17 '24 16:10 seaglade

Also, this generally gets worse over time. Sometimes destroying and recreating the compose stack mitigates it temporarily, but after several hours the problem resurfaces and the load times get longer and longer reaching nearly a minute before becoming entirely nonresponsive.

seaglade avatar Oct 17 '24 16:10 seaglade

Looks like there's an API request to /api/v3/root/config taking 20+ seconds, and another to /api/v3/core/brands/current with a similar length. Also, lots of JS chunks are taking 2-3 seconds to load each, and there are dozens of them waiting.

I am also getting tons of failed requests (522 errors) with NS_ERROR_CORRUPTED_CONTENT. Repeatedly reloading seems to almost fix it but it takes several minutes. Manually resending those requests then reloading with cache seems to work best.

Something seems to be very messed up with the frontend but I can't tell if it's just authentik or an issue on my server somehow. Seems unlikely since other services are unaffected.

seaglade avatar Oct 18 '24 22:10 seaglade

It does load very slowly 🤔 image

Mahoo12138 avatar Nov 25 '24 12:11 Mahoo12138

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.