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

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 6.5.0, 6.6.2
    • Component/s: Connection Layer
    • 5

      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:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            garr@pixels.online Garr Godfrey
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: