Band-aid fix for exceeding max open files limit on OSX.
http://docs.basho.com/riak/latest/ops/tuning/open-files-limit/#Mac-OS-X
To check the current limits on your Mac OS X system, run:
launchctl limit maxfiles
Files should be saved as /Library/LaunchDaemons/limit.maxfiles.plist
and
/Library/LaunchDaemons/limit.maxproc.plist
.
Both plist files must be owned by root:wheel and have permissions
-rw-r--r--
. This permissions should be in place by default, but you can ensure that they are in place by runningsudo chmod 644 <filename>
. While the steps explained above will cause system-wide open file limits to be correctly set upon restart, you can apply them manually by runninglaunchctl limit
.
In addition to setting these limits at the system level, we recommend setting the at the session level as well by appending the following lines to your
bashrc
,bashprofile
, or analogous file:
ulimit -n 65536
ulimit -u 2048