When I run this Node.js code:
var mongodb = require(\'mongodb\'),
MongoClient = mongodb.MongoClient;
MongoClient.connect(\'mongodb://localhost:27017/mydb\', fu
Sure. MongoClient uses the connection pools option from the node native driver. This is actually really a Server Object and the number of connections is 5 by default.
You can override the setting like this:
var async = require('async'),
mongo = require('mongo'),
MongoClient = mongo.MongoClient;
MongoClient.connect('mongodb://localhost/test',{ server: { poolSize: 1 }},function(err,db) {
});
So setting "poolSize" in the server options specifies the number of connections used in the pool. Best to stick with the default or higher really though.