diff --git a/narwhal.local.conf b/narwhal.local.conf index 9fe4e691b..482c677c4 100644 --- a/narwhal.local.conf +++ b/narwhal.local.conf @@ -1,3 +1,11 @@ if [ -z "$NARWHAL_ENGINE" ] && [ -d "$NARWHAL_HOME/packages/narwhal-jsc" ]; then export NARWHAL_ENGINE=jsc fi + +if [ "$NARWHAL_ENGINE" == jsc ] && [ `ulimit -n` -lt 1024 ]; then + # JSC and Narwhal together open a lot of files. We want to increase the + # ulimit to a certain minimum here, but only the soft limit. We avoid + # changing the hard limit because someone might want to change the limit + # again later. + ulimit -Sn 1024 +fi