Skip to content

Instantly share code, notes, and snippets.

@xpe
Created October 24, 2014 03:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xpe/9d14db8884bcf67f9388 to your computer and use it in GitHub Desktop.
Save xpe/9d14db8884bcf67f9388 to your computer and use it in GitHub Desktop.
Adjusts ulimit, as needed, and starts Riak on Mac OS X. Tested on Yosemite.
#!/usr/bin/env bash
MAXFILES=$(launchctl limit maxfiles | sed -e 's/[[:space:]]+/ /g' | xargs)
if [ "$MAXFILES" != "maxfiles 65536 65536" ]; then
set -x
sudo launchctl limit maxfiles 65536 65536
fi
set -x
ulimit -n 65536
riak start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment