Triggers stopped working

Hi there.

None of my triggers are working anymore. I’m on a shared cluster, and i realize there is limitations - but they haven’t been working for a week.
At first it was just a single one of them that would not fire. I then replaced it with a new but identical trigger, and that actually fixed it for a while - but now none of them are working.
I have tried turning them off and on again, but that made no difference.

How do i fix this? My app architecture is highly relient on those triggers…

Thanks in advance

Hi @Rasmus_B,

There are several reasons that can cause the triggers to fail, and ultimately be suspended by the system.

  • Do you receive messages about the reasons they’re failing?
  • Do you see any errors in the app logs?
  • Are your triggers too complex? Have you verified in the logs how much time they take to complete? As you say, there are limitations that can be hit at some point.
  • Are your triggers fired too often? MongoDB keeps track of pending operations in what’s called an Oplog, but if the triggers take more time to complete than the frequency the relevant events come in, at some point the Oplog just can’t keep the pace, and suspends the triggers.
  • If you don’t need a trigger to be treated in a strict sequence, disabling the Event Ordering for it helps performance (even though that may still be limited in a shared cluster)

There are a number of checks we can do as Support, to see what’s going on, and strategies we can suggest: we’d need to look into your app for that, though, if you’re able to, you should open a case so that we can help you directly.

1 Like