[ad_1]
I have these two heavy db operations that run every midnight:
// updates = array of findByIdAndUpdate operations -- about 20k records
await Promise.all(updates)
// mongodb disconnects here
// deletes = array of findByIdAndDelete operations -- about 5k records
await Promise.all(deletes)
It seems like the update operations are executed successfully. I don’t understand why it was disconnected as there was no error.
Mongo version 4.4 – running locally
This issue started to occur more frequently especially after upgrading mongo from 3.6 to 4.4.
How can I prevent it from disconnecting?
[ad_2]