-
Type: Bug
-
Resolution: Gone away
-
Priority: Critical - P2
-
None
-
Affects Version/s: 6.5.0, 6.6.1
-
Component/s: CMAP, Wire Protocol
Use Case
My database queries all work fine but in production with high load I get this SPORADIC issue:
Write operations – updateOne mostly, also insert, findOneAndUpdate – get persisted in the database but the node.js mongodb driver function does not return / the returned Promise is neither resolved nor rejected.
I activated command monitoring and can confirm that ‘commandStarted’ events are fired but neither ‘commandSucceeded’ nor ‘commandFailed’ events appear for these cases. I checked the state of my documents in the db and can confirm that the write operations were successfully persisted – the documents contains the updated info as expected.
Although the driver does not do much between a ‘commandStarted’ and the ‘commandSucceeded’ / ‘commandFailed’ events – it essentially compresses the message and sends it via a socket – the issue is caused by the driver.
I am certain because I used the exact same application logic that calls the driver functions and observed the issue with:
- MongoDB v4.0 (hosted on Scalingo) with the driver v6.5.0
- MongoDB v7.0 (hosted on Atlas) with driver v6.5.0
- MongoDB v7.0 (hosted on Atlas) with driver v6.6.1
But I did not observe the issue with:
- MongoDB v4.0 (hosted on Scalingo) with driver v3.5.7
- MongoDB v7.0 (hosted on Atlas) with driver v5.9.2
It may be worth mentioning that the ops use writeConcern w: 1 and in all cases I was/am running a 3 node replica set.
User Impact
- Affected operations do not return and the application logic cannot complete its task
- Once exactly 100 write ops are “hanging”, ALL queries – reads included – are not executed and hence the application server is essentially down
- is related to
-
NODE-6370 bulkWrite does not resolve after update, and connection not returned to pool
- Closed