Adjust ulimit, as needed, start Riak on Mac OS X

David James davidcjames at
Thu Oct 23 23:48:18 EDT 2014

I recently learned a nice way to bump maxfiles on Mac OS X. This works for
me 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
set -x
ulimit -n 65536
riak start

I save the file to ~/bin/start-riak and use it instead of `riak start`.

Gist here:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list