Reputation: 59495
I am getting this error when running tests in node.
MongoError: cannot perform operation: a background operation is currently running for ...
I need a way to stop all running background operations via the command line.
Upvotes: 3
Views: 2350
Reputation: 1348
You need db.killOp(). This will kill a list of current operations which you can obtain via db.currentOp() which returns a list of all the current operations.
Upvotes: 4