Docs Menu

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.

You can pause Atlas 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 Atlas 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 Atlas 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 Sync tab of the Atlas App Services UI, press the Pause Sync button.

the pause sync button
2

In the modal that pops up, press the Pause Sync button.

the pause sync model
3

Press the Review & Deploy button in the blue notification bar telling you that changes have been made to your Atlas App Services app.

"Review & Deploy" notification
4

In the model that appears, review your changes and then press the green Deploy button.

Review Changes Model

You have now paused Atlas Device Sync and should get a green notification bar on the top of the Sync page that states that your deployment was successful.

Review Changes Model

After you have paused Atlas 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, Atlas App Services preserves your configuration settings and Device Sync metadata.

To re-enable Atlas Device Sync, follow the steps in the 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 Atlas Device Sync, you may have to terminate and re-enable Atlas Device Sync under a few different circumstances:

  • Altering a Partition-Based Device Sync configuration
  • Switching between Device Sync modes. For instance, if you are switching from Partition-Based Device Sync to Flexible Device Sync
  • 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 Atlas Device Sync session on a shared tier cluster due to infrequent usage
  • Troubleshooting, at the request of MongoDB Support
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 Atlas Device Sync in your App to stop syncing data across devices.

1

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

the terminate sync button
2

In the modal that pops up, check that you want to terminate sync by clicking the I want to terminate Sync checkbox and then click the Terminate Sync button on the modal.

the terminate sync model
3

Click the Review & Deploy button in the blue notification bar telling you that changes have been made to your Atlas App Services app.

"Review & Deploy" notification
4

In the model that appears, review your changes and then click the green Deploy button.

Review Changes Model

You have now terminated Atlas Device Sync and should get a green notification bar on the top of the Sync page that states that your deployment was successful.

Review Changes Model

After you have terminated Atlas 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 Atlas Device Sync, you must perform a manual client reset for that client to enable it to connect to Atlas App Services again.

When you pause Device Sync, Atlas 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 Atlas Device Sync, follow the steps in the Enable Atlas Device Sync guide.

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

←  Alter Your Sync ConfigurationOptimize Sync Atlas Usage →
Give Feedback
© 2022 MongoDB, Inc.

About

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