Skip to content

Instantly share code, notes, and snippets.

@khapota
Created August 21, 2017 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khapota/98019eea1eab113c5d0da66dbb309376 to your computer and use it in GitHub Desktop.
Save khapota/98019eea1eab113c5d0da66dbb309376 to your computer and use it in GitHub Desktop.
Kill long query
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5 && op.op == 'query') printjson(op);
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment