Introduction
This article addresses an issue where the Artifactory UI experiences extreme delays loading the login screen. Specifically, the login page displays the "Welcome to JFrog" message but hangs for a long time (sometimes over 10 minutes) before presenting the username and password fields. This issue is most prominent in environments configured with a very large number of access permissions. The solution involves modifying the artifactory.system.properties file to allow Artifactory to refresh permission caches asynchronously.
Problem
When attempting to access the Artifactory UI, the login page takes an exceptionally long time to load. During this time, the frontend-service.log or artifactory-request.log will typically show the GET /api/v1/ui/auth/current request timing out or failing with a 500 HTTP response code after running for 60 to 120+ seconds.
This occurs because, by default, Artifactory synchronously fetches all permissions from Access before completing the login. This default behavior is active whenever the artifactory.acl.version.cache.async.reload property is not explicitly defined in the artifactory.system.properties file, which is the case for most standard installations. (The same behavior occurs if the property is present but manually set to false). In environments with a substantial number of permission targets (e.g. over 50,000), this synchronous fetch operation becomes a heavy bottleneck, resulting in the prolonged login delay.
The request signature we calculated does not match the signature you provided.
Resolution
The solution is to enable asynchronous reloading for the permission cache by adding or updating the artifactory.acl.version.cache.async.reload property. When this property is set to true, Artifactory immediately completes the login using the existing cached permissions, while a background thread refreshes permissions from Access asynchronously.
Step-by-Step Instructions
- Verify your permission target count: To confirm if your environment has a high number of permissions causing this bottleneck, run the following queries against your Artifactory database:
SELECT COUNT(*) FROM access_permissions;
SELECT COUNT(*) FROM access_permissions_v2;
Note: Depending on your Artifactory version, one of these tables may not exist, which is normal. If the returned count is exceptionally high (e.g. 50,000+), proceed to the next steps.
- Locate your artifactory.system.properties file in $JFROG_HOME/artifactory/var/etc/artifactory/.
- Open artifactory.system.properties for editing.
- Add the following property to enable asynchronous permissions caching:
artifactory.acl.version.cache.async.reload=true
- Save the artifactory.system.properties file.
- A full restart of the Artifactory services is required for this change to take effect. After restarting, test the login UI to confirm that the screen and login fields load quickly as expected.
Note: We will be replacing the permission caching mechanism in the near future. Please look for updates in the upcoming releases.