Navigation

Configure Maintenance Window

You can set the hour of the day that Atlas should start weekly maintenance on your cluster. This setting is optional and is not required for most clusters. Configure maintenance windows from your project settings.

Typically, you do not need to manually configure a maintenance window. Atlas performs maintenance automatically in a rolling manner to preserve continuous availability, with the exception of a momentary replica set election. You can use the Test Failover capability to ensure that your application is resilient to replica set elections.

Custom maintenance windows provide greater control over your cluster performance by allowing maintenance to occur at your preferred time of day.

Maintenance Window Considerations

Urgent Maintenance Activities

Atlas performs urgent maintenance activities such as security patches as soon as they are needed without regard to scheduled maintenance windows.

Ongoing Maintenance Operations

Once you schedule a maintenance window for your cluster, you cannot change it until any ongoing maintenance operations have completed.

Maintenance Requires Replica Set Elections

Atlas performs maintenance the same way as the maintenance procedure described in the MongoDB Manual. This procedure requires at least one replica set election during the maintenance window per replica set.

Use the Test Failover capability to ensure that your application is resilient to replica set elections.

Maintenance Starts As Close to the Hour As Possible

Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or unexpected system issues could delay the start time.

Procedure

Open Your Project Settings

1
2

View or modify project settings.

Configure Maintenance Window

  1. Toggle the Set Preferred Cluster Maintenance Start Time setting to On.
  2. Click pencil icon to set the Maintenance Start Time. Atlas displays this time in the time zone set in your Profile.

Respond to Required Maintenance

When maintenance is required, Atlas:

  • Displays a banner in your project’s cluster list showing the date and time when the maintenance is scheduled.

  • Sends a notification email to users with the Project Owner role between 48 and 72 hours before the scheduled maintenance.

    Note

    To configure how you receive scheduled maintenance window notifications, see Configure a Maintenance Window Alert.

    With this information, you can choose one of three options:

    1. Do nothing. The maintenance occurs during your scheduled maintenance window.
    2. Select Begin Maintenance Now. The scheduled maintenance starts immediately. If you choose this option, you are asked to confirm it in a separate modal.
    3. Select Defer Maintenance for One Week. The scheduled maintenance starts during your preferred maintenance window one week after the given scheduled maintenance date and time. If you choose this option, you are asked to confirm it in a separate modal.