Docs Menu

Docs HomeAtlas App Services

Pause or Terminate Sync

On this page

  • Overview
  • Pause Sync
  • Procedure
  • Resume Sync
  • Procedure
  • Terminate Sync
  • Procedure
  • Re-Enable Sync
  • Procedure

If you want to disable Atlas Device Sync for your app, you can temporarily pause or permanently terminate it. You can also re-enable Device Sync after disabling it.

You can temporarily pause Device Sync if you need to pause your cluster. With a temporary pause, you can resume without resetting your Device Sync configuration or losing Device Sync metadata.

You can permanently terminate and re-enable Device Sync for troubleshooting or if you want to change your Device Sync configuration.

Device Sync pauses automatically after 30 days of inactivity.

You can pause Device Sync for a period of time without disabling it entirely. When you pause Device Sync, you stop syncing changes between Atlas and your application.

Important

If you need to pause your cluster, pause Device Sync first. Otherwise, you must terminate and re-enable Device Sync and perform a client reset.

Pausing Device Sync rejects any incoming client connections. This means that pausing Device Sync for your App stops syncing changes for all clients.

To pause Device Sync from the client side, using logic that situationally pauses Device Sync during a session, see your preferred SDK:

After pausing Device Sync, you can re-enable it. Pausing Device Sync maintains the configuration settings and all of the Device Sync metadata, which contains the sync history. When you re-enable paused Device Sync, your clients can reconnect normally.

Warning

If your oplog rolls past the time that you paused Device Sync, you must terminate and re-enable Device Sync. For example, if you only keep 12 hours of oplog for your cluster, and you pause Device Sync for longer than 12 hours, you must terminate and re-enable Device Sync.

Terminating and re-enabling paused Atlas Device Sync for your App erases Atlas Device Sync metadata and requires you to specify configuration settings again. Clients must perform a client reset when they reconnect after Atlas Device Sync has been terminated. For more information, see: Terminate Sync.

1

In the Device Sync tab of the App Services UI, press the Pause Sync button, and then confirm that you want to pause sync.

the pause sync button

The Device Sync title will now show "Paused":

"Review & Deploy" notification

After you have paused Device Sync, you can resume it to begin syncing again for all clients.

Warning

If your oplog rolls past the time that you paused Device Sync, you must terminate and re-enable Device Sync. For example, if you only keep 12 hours of oplog for your cluster, and you pause Device Sync for longer than 12 hours, you must terminate and re-enable Device Sync.

Terminating and re-enabling paused Atlas Device Sync for your App erases Atlas Device Sync metadata and requires you to specify configuration settings again. Clients must perform a client reset when they reconnect after Atlas Device Sync has been terminated. For more information, see: Terminate Sync.

The process to resume Device Sync is the same as the process to re-enable Device Sync. However, when you pause Device Sync, App Services preserves your configuration settings and Device Sync metadata.

To re-enable Device Sync, follow the steps in the Configure and Enable Atlas Device Sync guide. You can skip the Configure Sync step.

Clients do not need to perform a client reset when reconnecting after a pause.

If you have enabled Device Sync, you may have to terminate and re-enable Device Sync under a few different circumstances:

  • An upgrade from a Shared Tier Atlas Cluster to a Shared or Dedicated instance

  • A move to an Atlas cluster that is distributed across regions/cloud providers

  • An upgrade to NVMe Atlas clusters

  • An oplog rollover

  • A paused Device Sync session on a shared tier cluster due to infrequent usage

  • Troubleshooting, at the request of MongoDB Support

  • Altering a Partition-Based Sync configuration

  • Switching between Sync modes. For instance, if you are switching from Partition-Based Sync to Flexible Sync

  • Dropping a collection you've used with Sync. For example, if you have a Team collection that stores and syncs Team objects, and then you drop that collection, you must terminate and re-enable Sync.

Warning

Restore Sync after Terminating Sync

When you terminate and re-enable Atlas Device Sync, clients can no longer Sync. Your client must implement a client reset handler to restore Sync. This handler can discard or attempt to recover unsynchronized changes.

Terminate Device Sync in your App to stop syncing data across devices.

1

In the Sync tab of the App Services UI, click the red Terminate Sync button.

2

In the modal that appears, type "Terminate Sync" in the text entry, and then click the Terminate Sync button.

the terminate sync model

If you are using UI deployment drafts then you must deploy the draft to actually terminate Sync.

You have now terminated Device Sync.

After you have terminated Device Sync, you can re-enable it. Re-enabling Device Sync enables your App to begin syncing changes to Atlas again. After you re-enable Device Sync, your App begins accepting incoming client connections again. However, if a client had previously connected to your App before you terminated Device Sync, you must perform a client reset for that client to enable it to connect to App Services again.

When you pause Device Sync, App Services preserves your configuration settings, and you can skip the Configure Sync step. When you terminate Device Sync, or when the oplog rolls past the time that you paused Device Sync, you must specify the configuration settings again.

To re-enable Device Sync, follow the steps in the Configure and Enable Atlas Device Sync guide.

If you are re-enabling Device Sync after you have terminated it, you must perform a client reset in your client applications:

←  Sync SettingsError Handling →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.