-
Type: Task
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.33
-
Component/s: MongoDB 3.2
-
Environment:Windows Server 2012 RC
-
Empty show more show less
No issue if there are only a few single requests or small size loops.
but If you send many requests around the loop
If pooSize and socketTimeOut are not appropriate
After all requests have finished and socketTimeOut has passed
There is a disconnected connection.
I'm using keepAlive option
- If the number of loops is large, and the number of socketTimeOutMS is large,
- If the number of loops is large, recreate when poolSize becomes large.
See this code
for (let i = 0; i<1000; i++) { collection.find({'_id':o_id}, function(err, cursor){ ... }); } //Users.find all compledted and socketTimeOutMS elapses disconnected..