christkv/node-mongodb-native — Issue #416: Using ReplSet causes 100% CPU usage with v0.9.7.1
Author: novemberborn
Created: 2011-11-25 12:30:30+00:00
State: open

If I try to connect to a ReplSet the CPU of node proc will spike to 100% within half a minute.

Test script:

```js

var mongodb = require("mongodb");

var options = {
auto_reconnect: true,
poolSize: 4,
socketOptions: { keepAlive: 100, timeout: 30000 }
};

var replSet = new mongodb.ReplSetServers([
new mongodb.Server("mongo-1", 27017, options),
new mongodb.Server("mongo-2", 27017, options),
new mongodb.Server("mongo-3", 27017, options)
]);
var db = new mongodb.Db("database", replSet);
db.open(function(err, client){
// Not even doing anything here
});
```