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

bulkWrite does not resolve after update, and connection not returned to pool

    • 0
    • 5
    • Not Needed
    • Not Needed

      Our issue has been ongoing for several versions now and have not been able to go beyond 5.9.2 version of the driver. I believe it is the same as NODE-6166 which was closed without finding the issue.

      We have both `find` and `bulkWrite` operations that will behave similarly. We only see the issue in production, and it occurs roughly 1 in 3,000 of our updates, and each of those updates involves 4 or 5 bulkWrite operations. We have moderately heavy load, running about ~4,000 updates per second across all nodes, which is about 40/s on each node.

      Seemingly randomly, those operations never return, but there is no active connection to the db server. I have viewed internals, and a connection from the connection pool is in use for each of the updates that hang. I believe the problem must be in the reading of the response on the socket, but this driver code has changed so much since 5.9.2 it is very difficult to know what it could be.

      We are connected to Atlas with a 3 replica cluster. No unusual activity on server shows in monitoring. Although random and rare relative to the number of updates, it is easy to reproduce when making many updates, although I have not been able to reproduce locally with simulated load testing.

      The server is running v5.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            garr@pixels.online Garr Godfrey
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: