title: Monitoring MongoDB "background operations"?
body: <p>EDIT:
  Basically I'm looking for some hints on how to understand what background operations are running on my MongoDB instance and possibly reduce/disable them when necessary so they don't interfere with running tests. I've tried <code>mongostat</code> and <code>mongotop</code> but haven't found anything with them that helped me understand what background operations are running and what is initiating them. <code>db.currentOp()</code> consistently returns an empty array when run before I start running my tests.</p>
  
  <p>I regularly run tests while developing with node (mocha, cucumber). Since yesterday, about 25% of the time server initialization fails trying to connect to mongodb with the following error:</p>
  
  <pre><code>**Unhandled rejection MongoError: exception: cannot perform operation: a background operation is currently running for collection** somecollection
      at Function.MongoError.create (/somepath/node_modules/pow-mongodb-fixtures/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
      at /somepath/node_modules/pow-mongodb-fixtures/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:793:66
      at bound (domain.js:254:14)
      at runBound (domain.js:267:12)
      at Callbacks.emit (.../node_modules/pow-mongodb-fixtures/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:94:3)
      at null.messageHandler (/somepath/node_modules/pow-mongodb-fixtures/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:235:23)
      at Socket.&lt;anonymous&gt; (/somepath/node_modules/pow-mongodb-fixtures/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:294:20)
      at Socket.emit (events.js:107:17)
      at readableAddChunk (_stream_readable.js:163:16)
      at Socket.Readable.push (_stream_readable.js:126:10)
      at TCP.onread (net.js:538:20)
  </code></pre>
  
  <p>We use pow-mongodb-fixtures to clear the db and fill it with some basic data before running tests, which is where this is happening. AFAIK nothing major changed when this started happening. Any ideas where I can even start researching the source of this error?</p>