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

Attempt to detect memory leaks and active handles sooner

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Testing

      How are you using Mongo? What version of the server and driver are you using?

      https://github.com/mongodb/node-mongodb-native/pull/3216/files
      In the PR linked above we attempted to detect active handles that are keeping Node.js from closing. This can be sockets, timers, or other event based resources. Additionally the mocha hooks attempted to detect memory leaks by checking total usage at beginning and end of test runs. Unfortunately that would need to be written as some kind of continuous monitor since by the end of the run garbage collection may have been able to clean up the leak.

      Ideally, it would help a Node engineer greatly to be able to identify the source of a resource keeping the process open at the end of a mocha run, and also exiting the test run with failure if such a leak is detected. Currently evergreen will wait for the 20min default timeout to call the test a timeout failure, we could learn that much sooner.

      What is the feature/improvement you would like?

      What use case would this feature/improvement enable?

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: