isolated memory leak with basic connection

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: 6.20.0
    • Component/s: Connection Layer
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      We have been trying to isolate a memory leak with the mongo/bun.sh combination, and in doing so have also seen a memory leak with basic connectivity of the latest nodejs-mongo-native (6.20.0) and nodejs (24.10.0).  We have a basic script that simply runs a 1 minute interval scheduler to keep the application running), and either does nothing else (base case) or connects to mongo (where the issue can be seen).  Testing against mongodb v8.

      User Experience

      • RSS memory keeps increasing at ~1MB/hour when just connected (no queries) to a replicaset (have also seen against sharded cluster).

      mins | nodejs, idle | nodejs, connected
      0 | 75224 | 84388
      15 | 75352 | 76912
      30 | 75352 | 77192
      60 | 75352 | 78408
      90 | 75352 | 78460
      150 | 75352 | 79548
       

      Dependencies

      • nodejs 24.10.0, nodejs-mongo-native 6.20.0, mongodb 8.0.12

      Risks/Unknowns

      • nodejs applications using the latest nodejs-mongodb-native module will keep consuming memory until the application crashes

      Acceptance Criteria

      Implementation Requirements

      • functional reqs, potential snafus to avoid, performance targets, etc

      Testing Requirements

      • unit test, spec test sync, etc

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc
      • if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward

        1. attempted_repro_information.zip
          163 kB
        2. leak.js
          6 kB
        3. NoConnect.zip
          13.74 MB
        4. WithConnect.zip
          16.42 MB

            Assignee:
            Bailey Pearson
            Reporter:
            Rob Gillan
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: