Azure AD sync crashing

BenBa 41 Reputation points

About 3 weeks ago we started having an issue on our Azure AD sync server. The DC is running Windows 2008R2 and has been solid as a rock for years. No changes have been made to the server. In late June we noticed that the sync stopped working. I was not able to RDP to the server and had to do a hard reboot. After the reboot the sync started working and I was also able to RDP to the server. This is now a regular scenario. Every couple of days I have to hard reboot the server to gain access and get the sync running again.

The Even viewer shows :

Event ID 7031

The Azure AD Connect Health Sync Insights Service service terminated unexpectedly. It has done this 3 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service.

I have the service set to restart but it appears that is not working as it should. Even so there appears to be a correlation to the sync crashing and the inability to RDP to the server. Interestingly, during the "outage" period the AD domain sync appears to be working.

We are running version 14.18.0 of Azure AD Sync.

Any ideas are appreciated.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,102 questions
{count} votes

Accepted answer
  1. Siva-kumar-selvaraj 15,576 Reputation points

    Hello @BenBa ,

    Thanks for reaching out.

    Here are some possible cause which I could think at this point, but this would require more data collection such services.msc insight and system debugs (Like Memory, CPU etc..,) to figure out actual cause.

    Possible causes:

    1. Verify the allocated RAM memory for Sync server and make sure if there any other services are utilizing more memory/making any memory leaks by any chance? If the agent has 4GB of memory, then try upgrading to 8GB+ of memory would alleviate this issue. Hardware requirements for Azure AD Connect
      1. If the first option is not viable/preferred, edit the config to allow higher memory usage for this Sync Health agent. We cap the amount of memory/cpu usage to prevent the agent from ever bringing down the machine due to memory leaks or other scenarios (would be a bit counterintuitive for a health agent). You can edit this file (path may be slightly different if installed in a non-default location):
      C:\Program Files\Microsoft Azure AD Connect Health Sync Agent\Insights\Microsoft.Identity.AadConnect.Health.AadSync.Host.exe.config You should see a line similar to below:
      <add key="MaxPercentageMemoryUsage" value="10"/> Edit the value to a higher percentage (Based on trends, I recommend 18-20). This will allow the agent to use more memory without restarting constantly. This is not as preferred because you will need to reapply this fix every time the agent is upgraded, but would be a temporary fix.

    If non of above fix the issue then I would recommend you to reaching out Support team for active troubleshooting. Hope this helps.

    Siva Kumar Selvaraj

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. BenBa 41 Reputation points

    Since making the above change the server has been stable. Over a week now. I am hopeful that this did the trick. Thanks!!