For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Disable a Trigger

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 is disabled. It does not receive change events and will not fire.

Note

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

You can manually disable an active Trigger from the Atlas UI or by importing an application directory with the App Services CLI.

  1. In Atlas, go to the Triggers page.

    1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

    2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

    3. In the sidebar, click Triggers under the Streaming Data heading.

    The Triggers page displays.

  2. From the listed Triggers, find the Trigger that you want to disable.

  3. Toggle the Enabled setting to disable it, then click Save.

When you restore the database from a snapshot, any Trigger that was disabled or suspended is re-enabled. The Trigger will not fire for events that have already been processed. For more information on restoring from snapshots, see Restore Your Cluster.

Consider the following scenario:

  1. Your database Trigger is disabled or suspended.

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

  3. You restore the database from a snapshot to a time prior to the new documents being added.

  4. Atlas restarts the disabled database Trigger.

  5. The restarted Trigger picks up all of the newly-added documents and fires for each document. However, 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. After the snapshot restoration completes, the error disappears and the Trigger continues to execute normally.