Crowd Synchronisation against Active Directory times out with a load balancer in place

Still need help?

The Atlassian Community is here for you.

Ask the community

Scenario - Does this apply to you?

After upgrading to Crowd 2.7 or higher, you may notice that synchronisations against your Active Directory may fail, with timeouts similar to the following:

2014-12-02 15:29:20,185 scheduler_Worker-6 ERROR [] Error occurred while refreshing the cache for directory [ 13467652 ].
com.atlassian.crowd.exception.OperationFailedException: Error looking up attributes for highestCommittedUSN
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
	at com.sun.proxy.$Proxy39.synchronise(Unknown Source)
	at com.atlassian.scheduler.core.JobLauncher.runJob(
	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(
	at com.atlassian.scheduler.core.JobLauncher.launch(
	at com.atlassian.scheduler.quartz1.Quartz1Job.execute(
	at org.quartz.simpl.SimpleThreadPool$
Caused by: org.springframework.ldap.UncategorizedLdapException: Uncategorized exception occured during LDAP processing; nested exception is javax.naming.NamingException: LDAP response read timed out, timeout used:120000ms.; remaining name '/'

Other applicable factors:

  • There is a load balancer between Crowd and Active Directory
  • The same setup with no changes has worked before the upgrade (for example, a customer reported no problems with Crowd 2.6.4; and only after the ugprade to 2.7+ did problems begin appearing)


There are several possible causes; which may or may not resolve the problem. After investigating each cause, proceed to the next cause if the timeouts persist:

Has "Follow Referrals" been enabled?

The most common cause of timeouts is due to "Follow Referrals" being enabled. Generally, these timeouts have two root causes

  • The DNS for the domain is not valid, causing timeouts. See User Lookups Fail With PartialResultExceptions for more information
  • A large domain (particularly if the domain is partitioned) can also cause similar timeouts. Disabling this option will prevent Crowd from following referrals into other partitions which should speed up sync time (but may not give a complete result)

If "Follow Referrals" has been enabled, try disabling it before performing a second synchronization.

Restricting the LDAP Scope

Using a smaller filter, see if you can limit the LDAP search to just a single, smaller OU; the smaller the better.

Does upgrading to Crowd 2.8.2 or higher resolve the problem?

Crowd 2.8.2 introduced some important improvements for Crowd performance; particularly in large directories. See the Crowd 2.8.2 Release Notes for more information.

Can you bypass the load balancer?

Bypass the load balancer; and connect directly to Active Directory. Bypassing the load balancer (even just temporarily) will help to confirm the load balancer as the cause of the problem (or remove it from consideration). Some customers have reported problems with certain load balancer products / configurations after upgrading to Crowd 2.7 or higher. The same configuration works without any problems in Crowd 2.6. Some customers have reported success with using HAProxy as a load balancer to Active Directory

Please note that the setup or configuration of a load balancer is not covered by Atlassian Support Offerings.


We are currently unsure as to why some load balancer configurations may time out during LDAP Searches. If you have information regarding timeouts against Active Directory with a load balancer after upgrading to Crowd 2.7, we'd love to hear from you!


Use one of the following workarounds:

  • Bypass the load balancer if possible
  • Utilize an alternative load balancer, such as HAProxy
Last modified on Feb 26, 2016

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.