This blog article outlines how the heartbeat service restart behaviour works in case that Dynamics 365 is not available for some reason. For example, there is an update: after the update Dynamics 365 will work as usual, but not our services - they will stop. Therefore we provide the heartbeat service.
The heartbeat service is verifying every service available in the WatchedConfigurations registry key. It runs every 5 minutes and verifies each service is in “Running” state.
Not running services are checked for 20 times every 5 minutes. If the service has still not been restarted after those 100 minutes, the heartbeat service will check and try to restart this service every 50 minutes for a total of 24 hours monitoring time of a particular service.
If a service still has failed to start after those 24 hours, the heartbeat service will stop trying to restart this service.
Any service with the “AlwaysRestartService“ flag set will never be removed from the watched configurations, regardless of its state.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to firstname.lastname@example.org.