Skip to content

Instantly share code, notes, and snippets.

@zh4ngx
Forked from andrewguy9/long_running.txt
Created August 14, 2013 22:40
Show Gist options
  • Save zh4ngx/6236405 to your computer and use it in GitHub Desktop.
Save zh4ngx/6236405 to your computer and use it in GitHub Desktop.
Log onto bad mongo primary
Use mongotop to find bad database
Run this to find long running queries
db.currentOp()['inprog'].filter(function (t){return t.secs_running > 10}).map(function (t){return t.opid})
Kill bad ops with
db.killOp(<opid>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment