-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 4.13.0, 5.0.0
-
Component/s: None
We experience a memory leak in the mongodb node driver introduced in version 4.13.0. The issue still persists in version 5.0.0
The leak can be replicated with this setup:
https://github.com/awilts/mongodb-leak
Check out the repository and run npm run test.
With driver version 4.13.0 memory consumption will grow with each iteration until it finally reaches ~80MB after 1000 iterations.
With version 4.12.1 there is almost no growth per iteration.
This leak prevents us from adopting the newer driver version. In our jest test setup we start & shutdown our app frequently. Because of this leak memory is not released after shutdown. This causes our tests to run into OOM errors.
Is this a known issue? I was unable to find any related tickets.
There are no Sub-Tasks for this issue.