Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5024

Memory leak introduced in 4.13.0

    • 0
    • 3
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            alexander.wilts@fulfillmenttools.com Alexander Wilts
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: