How to fix slow loading User and Groups page when LDAP authentication is enabled

By default, LDAP group searches are cached for a short period of time (5 minutes). LDAP group searches tend to be an expensive operation, and with a large amount of users can cause the loading of certain pages (i.e. User & Groups page) to take longer than normal. Depending on how often LDAP group membership changes, this cache timeout can be increased in order to reduce the amount of LDAP group searches needed for each user.

Step 1: Identify the Arcadia LDAP cache timeout settings, which can be found in the Arcadia Visualization Server Safety Valve (settings_cm.py) if using Cloudera Manager, or in the Arcviz Settings if you’re using Ambari:

# Cache settings
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 300

Step 2: Comment out the existing settings:

# Cache settings
#AUTH_LDAP_CACHE_GROUPS = True
#AUTH_LDAP_GROUP_CACHE_TIMEOUT = 300

Step 3: Add new LDAP group cache timeout settings that reflect a more realistic time interval that would make sense to query for changes to a user’s LDAP group membership (i.e. 4 hours):

AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600*4  # Cache for 4 hours
REMOTE_GROUP_CACHE_TIMEOUT = 3600*4  # Cache for 4 hours

Step 4: Restart Arcadia Visualization Server. The first time around the User & Groups page may still load slowly, but after that it should be much quicker.