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

Symptom where the driver seems to hold to heap (doc references) and leads to OOM

    • Type: Icon: Question Question
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.5.0
    • Component/s: Bulk API
    • 3
    • 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?

      This test app runs into OOM if it keeps open MongoClient that handles successive insertMany() as in the right.

      Thus, the app must close the client regularly in order to prevent OOM as in the left.

      https://github.com/MongoDBAtlas/clusteredCollection/commit/9a4f121f1ad943750e3287bcf123d4c64834ef32?diff=split

      Slack chat here.

      Node heap snapshots here

      Use Case

      As a SA
      I want this issue to be looked into
      So that it's clarified whether or not it's a driver issue.

      User Impact

      *internal report

      Dependencies

      • nodejs applications that rely on successive insertMany of a load of docs

      Unknowns

      • When insertMany is invoked repeatedly, V8 scavenger can't reclaim heap and the app ends up with OOM.

      Acceptance Criteria

      Implementation Requirements

      • Apps must not have to close the mongoclient regularly to release heap references.

      Testing Requirements

      • repeat insertMany(a large number of docs: say, 3M docs)

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            g.cho@mongodb.com Gunho Cho
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: