agreeable-elephant-38605
02/13/2024, 4:13 PMeventCreated
jobs weren't being cleaned up properly (or something along these lines):
test> db.agendaJobs.find({name: 'eventCreated'}).count()
5057475
a majority of these had a nextRunAt
of `null`:
test> db.agendaJobs.find({name: 'eventCreated', nextRunAt: null}).count()
5056482
I ended up deleting these to see if it helped and our mongo CPU usage dropped pretty much back down to 0.
I haven't dug into why so many are created or whether something should actually be cleaning them up, but just thought I'd share here in case this is a known issue. It's possible its related to our own setup, although I don't think we have any changes that would affect this job type specificallyfuture-teacher-7046
agreeable-elephant-38605
02/13/2024, 4:17 PMagenda.define
is used in the constructor of the `EventNotifier`: https://github.com/growthbook/growthbook/blob/1a9e129bfae401e62bde002fb4679b5dc9de956d/packages/back-end/src/events/notifiers/EventNotifier.ts#L[…]6 and in all usages of perform()
a new EventNotifier is createdfuture-teacher-7046
agreeable-elephant-38605
02/13/2024, 4:20 PMfuture-teacher-7046