MongoDB Trigger not firing

Hello. I have a problem with my mongoDB trigger on production. Somehow it doesn’t get fired on certain documents and i can’t figure out why. Mentioning that i have about 500K triggers firing every day. Is it a limitation or something? This doesn’t happen on my other enviornments.

Hi @Ciprian_Stanciu,

MongoDB Realm limits the execution of Trigger Functions to a rate of 1000 executions per second across all Triggers in an application. If additional Triggers fire beyond this threshold, MongoDB Realm adds their associated Function calls to a queue and executes the Function calls once capacity becomes available.

Are the triggers not happening on specific operations ir specific times?

Can you link the application.


Hello Pavel,

i’ve read about that threshold but i don’t think we have so many triggers happening per second. The triggers are not happening on specific documents from what i saw.
Here is a link to the application:


@Ciprian_Stanciu What is the significance of those documents and what operations are expected to trigger the code?


Those documents are just some numeric values. The trigger should fire at every update/insert/replace and calculate a sum accoring to the values in the counters.

Here is an example of a document from the “stock” collection on which the trigger didn’t work yesterday, but today when there aren’t so many triggers it is working.