mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Don't lower ulimit max open files if it's already higher than desired
Previously, if the default ulimit was set to a value higher than 16384, it was lowering it. While this doesn't do much for users with default OS settings, those that have modified their ulimit settings will have their settings maintained.
This commit is contained in:
committed by
Ben Newman
parent
eef23a30b4
commit
3c3352be12
6
meteor
6
meteor
@@ -114,10 +114,8 @@ DEV_BUNDLE="$SCRIPT_DIR/dev_bundle"
|
||||
METEOR="$SCRIPT_DIR/tools/index.js"
|
||||
|
||||
|
||||
# Bump our file descriptor ulimit as high as it will go. This is a
|
||||
# temporary workaround for dependancy watching holding open too many
|
||||
# files: https://app.asana.com/0/364581412985/472479912325
|
||||
if [ "$(ulimit -n)" != "unlimited" ] ; then
|
||||
# Try higher ulimit maxfiles settings until permitted by the kernel
|
||||
if [ "$(ulimit -n)" != "unlimited" ] && ! [ "$(ulimit -n)" -gt 16384 ] ; then
|
||||
ulimit -n 16384 > /dev/null 2>&1 || \
|
||||
ulimit -n 8192 > /dev/null 2>&1 || \
|
||||
ulimit -n 4096 > /dev/null 2>&1 || \
|
||||
|
||||
Reference in New Issue
Block a user