Summary

When the adTempus service fails, the adTempus crash handler program (adtdumprep.exe) is invoked to restart the service. By default the handler will restart the adTempus service up to five times in a 60-minute period and will not restart the service if it fails a sixth time within 60 minutes. The configuration for the handler can be modified to change the restart parameters. The handler can also be configured to send e-mail notification when a failure occurs.

Note: The automatic restart handler is meant to ensure that adTempus resumes operation immediately after a service failure, but service failures should not be part of normal operations. When adTempus fails in this fashion, you should report the problem to Arcana Development immediately so that we can investigate and resolve the issue.

More Information

When the adTempus service fails ("crashes") due to an unhandled error, it creates a dump file in the "crashdumps" folder under the adTempus program directory. This dump file can be used by Arcana Development to diagnose the cause of the failure. adTempus also logs an error message about the failure to the Application log in the computer's Event Viewer (with event ID 29).

After the dump file is created, the adtdumprep.exe program is invoked to restart the adTempus service. The behavior of this handler is controlled through the "adtdumprep.exe.config" file found in the adTempus program directory. This file can be edited using a text editor or XML editor.

The relevant section of the file is the "ADTDumpRepSettings" element, which has the following default content:

   <ADTDumpRepSettings>
<!--The name or IP address of the mail server to use for notification-->
<EMailSettings>
<MailServer></MailServer>
<UserID></UserID>
<Password></Password>
<ReturnAddress></ReturnAddress>
</EMailSettings>
    <!--The time, in minutes, after which to reset the failure count back to 0 if no
failures have occurred in the interval.
-->
<ResetPeriod>60</ResetPeriod>
    <FailureActions>
<!--This action will be executed the first 5 times adTempus fails in a 60-minute period-->
<FailureAction repeat="5">
<!--Set to true to restart the service, or false to not restart-->
<RestartService>true</RestartService>
        <!--Set the time (in seconds) to wait before restarting-->
<RestartDelay>0</RestartDelay>
        <!--The e-mail address to send notification to. Repeat for additional recipients-->
<NotifyRecipient></NotifyRecipient>
<NotificationSubject>The adTempus service on server %servername% has failed.</NotificationSubject>
<NotificationMessage>The adTempus service on server %servername% has failed %failurecount% times in the last %resetperiod% minutes. The service will be restarted.</NotificationMessage>
</FailureAction>
      <!--This action will be executed the 6th time adTempus fails in a 60-minute period.-->
<FailureAction >
<!--Set to true to restart the service, or false to not restart-->
<RestartService>false</RestartService>
        <!--Set the time (in seconds) to wait before restarting-->
<RestartDelay>0</RestartDelay>
        <!--The e-mail address to send notification to. Repeat for additional recipients-->
<NotifyRecipient></NotifyRecipient>
<NotificationSubject>The adTempus service on server %servername% has failed.</NotificationSubject>
<NotificationMessage>The adTempus service on server %servername% has failed %failurecount% times in the last %resetperiod% minutes. The service will not be restarted.</NotificationMessage>
</FailureAction>
      <!--No more actions will be taken after the 6th failure.-->

</FailureActions>
</ADTDumpRepSettings>

With these default settings the handler will behave as follows:

  • The first five times adTempus fails within the ResetPeriod, the service will be restarted. This is controlled by the first FailureAction element. The repeat attribute is set to 5, indicating that this action will apply to the first 5 failures. The RestartService value instructs the handler to restart the service.
  • The sixth time adTempus fails within the ResetPeriod, the handler will use the settings in the second FailureAction element. These settings instruct the handler to take no action: the RestartService value is "false".
  • Any subsequent failures within the ResetPeriod will not trigger any action by the handler.
  • If at least 60 minutes have elapsed since the last failure, the failure count is reset to 0. This is controlled by the ResetPeriod value.

Sending E-Mail Notification

The crash handler can be configured to send e-mail notification when a failure occurs. To use e-mail notification you must first provide values in the EMailSettings section of the configuration file. At a minimum, you must specify the MailServer (the name or IP address of your SMTP e-mail server) and the ReturnAddress (which must be a valid e-mail address in your mail system, or the server will reject the message). If your SMTP server requires authentication (most don't), specify the UserID and Password values as well.

Next, add one or more NotificationRecipient elements to the FailureAction sections. Each NotificationRecipient specifies the e-mail address of a single recipient. For example:

<NotifyRecipient>[email protected]</NotifyRecipient>

To notify multiple people, repeat the NotifyRecipient element.

You may have notification sent for each failure, or you may wish to specify recipients only for the second FailureAction section, so that notification is sent only if the service fails several times.

The NotificationSubject and NotificationMessage elements are preconfigured with a default subject and body for the e-mail message; you can change them if you wish.

Disabling Service Restart

In some cases you may not want the adTempus service to be restarted automatically. In this case, set the RestartService value in the first FailureAction section to "false":

<RestartService>false</RestartService>

You may still send e-mail notification, as described above.

Changing the Restart Count or Reset Period

If the service is failing repeatedly, it may not be appropriate for it to be automatically restarted five times. You can reduce the number of restarts by changing the repeat attribute for the first FailureAction section. For example, if you change the value to

<FailureAction repeat="2">

then the service will only be restarted twice within a 60minute period.

The reset period can be changed by modifying the ResetPeriod value.