Docs Menu

Docs HomeAtlas App Services

Disable a Trigger

On this page

  • Overview
  • Find the Trigger
  • Disable the Trigger
  • Deploy Your Changes
  • Pull Your App's Latest Configuration Files
  • Verify that the Trigger Configuration File Exists
  • Disable the Trigger
  • Deploy Your Changes
  • Restoring from a Snapshot

Triggers may enter a suspended state in response to an event that prevents the Trigger's change stream from continuing, such as a network disruption or change to the underlying cluster. When a Trigger enters a suspended state, it does not receive change events and will not fire.

Note

In the event of a suspended or failed trigger, Atlas App Services sends the project owner an email alerting them of the issue.

You can suspend a Trigger from the Atlas App Services UI or by importing an application directory with the App Services CLI.

Consider the following scenario:

  1. A database trigger is disabled or suspended.

  2. New documents are added while the trigger is disabled.

  3. The database is restored from a snapshot to a time prior to the new documents being added.

  4. The database trigger is restarted.

In this case, the trigger picks up all of the newly-added documents and fires for each document. It will not fire again for events that have already been processed.

Note

If a previously-enabled database trigger is running during snapshot restoration, you will see an error in the Edit Trigger section of the Atlas UI because the trigger cannot connect to the Atlas cluster during the restore process. Once snapshot restoration completes, the error disappears and the trigger continues to execute normally.

← Scheduled Triggers