whackanop
monitors mongodb for long-running operations, killing any that it finds.
See this blog post.
Or this StackExchange post.
$ whackanop -h
Usage of whackanop:
-debug=true: in debug mode, operations that match the query are logged instead of killed
-interval=1: how often, in seconds, to poll mongo for operations
-mongourl="mongodb://localhost?connect=direct": mongo url to connect to. Must specify connect=direct to guarantee admin commands are run on the specified server.
-query="{\"op\": \"query\", \"secs_running\": {\"$gt\": 60}}": query sent to db.currentOp()
-verbose=false: more verbose logging
-version=false: print the version and exit
Install from source via go get github.com/Clever/whackanop
, or download a release on the releases page.
Set this repository up in the standard location in your GOPATH
, i.e. $GOPATH/src/github.com/Clever/whackanop
.
Once this is done, make test
runs the tests.
The release process requires a cross-compilation toolchain.
gox
can install the toolchain with one command: gox -build-toolchain
.
From there you can build release tarballs for different OS and architecture combinations with make release
.
Official releases are listed on the releases page. To create an official release:
-
On
master
, bump the version in theVERSION
file in accordance with semver. You can do this withgitsem
, but make sure not to create the tag, e.g.gitsem -tag=false patch
. -
Push the change to Github. Drone will automatically create a release for you.
Please view the dev-handbook for instructions.