From fea480526b3a565a9d2d6fa38905866d3a595ea5 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sat, 2 Feb 2019 10:44:11 -0800 Subject: [PATCH] Add macOS tip --- scripts/ulimit-n.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ulimit-n.sh b/scripts/ulimit-n.sh index 1252eb454..09b2c14f8 100755 --- a/scripts/ulimit-n.sh +++ b/scripts/ulimit-n.sh @@ -4,13 +4,13 @@ # maxOpenFds=65000 -if [[ $(uname) = Darwin ]]; then - maxOpenFds=24576 # Appears to be the max permitted on macOS... -fi if [[ $(ulimit -n) -lt $maxOpenFds ]]; then ulimit -n $maxOpenFds || { echo "Error: nofiles too small: $(ulimit -n). Failed to run \"ulimit -n $maxOpenFds\""; + if [[ $(uname) = Darwin ]]; then + echo "Try running |sudo launchctl limit maxfiles 65536 200000| first" + fi } fi