From eaaedd3b437fb3da9dbd299204da4a7cd8ac57eb Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Wed, 15 Feb 2012 23:36:17 -0800 Subject: [PATCH] Bump file-descriptor ulimit as high as it will go on startup and remove previous workaround. This reverts commit a7c11b167e. See https://app.asana.com/0/364581412985/472479912325 --- app/meteor/run.js | 3 +-- meteor | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/meteor/run.js b/app/meteor/run.js index 8788968da2..2fcef02943 100644 --- a/app/meteor/run.js +++ b/app/meteor/run.js @@ -388,8 +388,7 @@ var DependencyWatcher = function (deps, app_dir, on_change) { return new RegExp(pattern); }); self.exclude_paths = [ - path.join(app_dir, '.meteor', 'local'), - path.join(app_dir, 'public') + path.join(app_dir, '.meteor', 'local') ]; // Start monitoring diff --git a/meteor b/meteor index 6e1c613e8b..c996f69069 100755 --- a/meteor +++ b/meteor @@ -78,5 +78,18 @@ else METEOR="$DEV_BUNDLE/app/meteor/meteor.js" fi + +# 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 + ulimit -n 16384 > /dev/null 2>&1 || \ + ulimit -n 8192 > /dev/null 2>&1 || \ + ulimit -n 4096 > /dev/null 2>&1 || \ + ulimit -n 2048 > /dev/null 2>&1 || \ + ulimit -n 1024 > /dev/null 2>&1 || \ + ulimit -n 512 > /dev/null 2>&1 +fi + export NODE_PATH="$DEV_BUNDLE/lib/node_modules" exec "$DEV_BUNDLE/bin/node" "$METEOR" "$@"