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

Extensive number of open client sessions and memory leak

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 2
    • Not Needed
    • Not Needed

      What problem are you facing?

      While debugging a possible memory leak by creating and analysing some heap snapshots in our Meteor app we discovered an extensive amount of ClientSessions and even some circular references which could prevent garbage collection of unused ClientSessions. The amount of ClientSessions and therefore also the allocated memory is growing substantially even after a few hours of being live in production.

      Is the circular reference expected behaviour and are unused ClientSessions properly destroyed after usage?

      Attached you can see the MongoClient with the growing array of activeSessions and the circular reference.

      What driver and relevant dependency versions are you using?

      Meteor version: 2.8.0
      Driver version: 4.11.0

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            dominik.schwarz@orderlion.com Dominik Schwarz
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: