We where having some memory filling up and some base line CPU usage increase in our Node.js applications. The cause seems to be the MongoB driver. After some investigation we found out that the “mongodb-core”-package (being used in mongodb v3.0.x - v3.2.x) is leaking timers due to changes in timers for Node.js v12.
The MongoDB Node.js driver versions 3.0.x till 3.2.x are reported to support Node.js v12.x.x here: https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#reference-compatibility-language-node
Is it possible to change the compatibility matrix or is the the bug going to be fixed? So people won’t run into the same issues while using older driver versions.
Timer list being filtered by “isRunning”:
“isRunning” implementation using “_called”:
Node.js pull request containing the removal of the “_called” variable (lib/timers.js line 282):