Unable to integrate LDAP in private gitlab server

Hello All,

I have recently deployed GitLab community edition on on-prem server, we tried configuring LDAP as suggested on GitLab Support page. I configured LDAP settings below. However upon running gitlab-ctl reconfigure, when I open gitlab site it gives error “502 gitlab is too busy and taking time to respond”. I have checked settings and made sure that I am able to pull data through credentials supplied and settings used. Please help.

 gitlab_rails['ldap_enabled'] = true
  gitlab_rails['prevent_ldap_sign_in'] = false

###! **remember to close this block with 'EOS' below**
  gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
     main: # 'main' is the GitLab 'provider ID' of this LDAP server
     label: 'LDAP'
     host: '172.18.x.x'
     port: 389
     uid: 'my user id'
     bind_dn: 'CN=Sukarn Nigam,OU=Admin_Users,OU=IDC,DC=domain,DC=com'
     password: 'my password'
     encryption: 'plain'
#    verify_certificates: true
#    smartcard_auth: false
     active_directory: true
#     allow_username_or_email_login: true
#     lowercase_usernames: false
#     block_auto_created_users: true
     base: 'DC=domain,DC=com'
     user_filter: 'sAMAccountname'
     timeout: 10
    username: ['uid', 'userid', 'sAMAccountname']
     name: 'cn'
     first_name: 'givenName'
   lastname: 'sn'