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

Node Driver Creating Thousands of Connections

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.1
    • Component/s: Lambda

      I am using the Node.js driver for Mongo, version 3.6.1. In our app, a single MongoClient is being created and used across the application, which is scaled out to many cluster nodes (typically 5, but sometimes as many as 85+). We've observed that under high query load, we see an excessive number of connections being created simultaneously. See the graphic below - in this case, there are thousands. We have confirmed that multiple clients are not being instantiated, and so this is not expected. See the screen grab below.

      Connection pool stats confirm this. Here's an example from one node in our Mongo cluster:

      "inUse" : 8,

      "available" : 16,

      "created" : 9167,

      "refreshing" : 0

      We are using the unified topology, and have not changed the connection pool limit, which defaults to 5. In any case, we shouldn't see this many connections. Can you please investigate? If any other info is needed, please let me know.

       

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            cory@transmit.live Cory Gaddis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: