-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.16.0
-
Component/s: Error
What problem are you facing?
When our server (temporarily) reaches 100% CPU due to a brief activity spike MongoDB will throw a (Mongo)PoolClearedError.
During this time, any changes (insert/update/remove) received are not reflected in the database, which is fine. However they are also not processed AFTER the server recovers (without a hard process restart or anything).
What driver and relevant dependency versions are you using?
MongoDB Node.js Driver 4.16, although looking at the code, I expect this issue to be present in 6.x as well.
MongoDB 6.0.12
Steps to reproduce?
Trigger a (Mongo)PoolClearedError while the waitQueue is being processed, and some or all of the entries in the waitQueue will not be processed, even after the server reconnects.
Possible cause
I think this problem may be caused by this check in server.ts:
if (!(err instanceof PoolClearedError)) { this.handleError(err); }
It seems like any error besides the PoolClearedError is handled, but PoolClearedErrors are not?