Error: file table overflow in Meteor 1.4.1.2

I started a project with themeteorchef’s boilerplate project.
After updating to Meteor 1.4.1.2, however, i get this error while starting the app:

/Users/sroettering/.meteor/packages/templating-compiler/.1.2.15.ncbw1b++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:177
throw error;
^

Error: ENFILE: file table overflow, scandir '/Users/sroettering/git/Meteor-Projects/MyApp/node_modules/iconv-lite/lib’
at Error (native)

npm version: 3.10.8
node version: 4.6.0

I already tried reinstalling meteor without success.
A freshly created meteor works fine, though.

Any ideas how to fix this?

Try to remove your node_modules directory (maybe it got corrupted or something) and then do npm install again to re-populate it.

Tried it multiple times, but the error still exists.

I started getting these when running multiple Meteor apps at the same time and running out of memory. Closing all 500 browser tabs in Chrome or restarting the computer would cure the issue.

5 Likes

Turns out this fixed the issue! I just restarted my macbook and all works fine again. Thank you!

2 Likes

I’m having the same issue, also with 1.4.2.

What is really strange is the meteor tries to open files in the node_modules that should certainly not be in the application

for example:

Error: ENFILE: file table overflow, scandir '/<path-to-project>/app/node_modules/tether/examples/facebook'
    at Error (native)
 => awaited here:

the tether package is just a random example, my develop environment crashes all the time with random paths

Do you have any git submodules or file links into node_modules?

I have two git dependencies in my package.json, but no manually added git submodule

Since I updated to 1.4.2.1 I am getting a lot of this type of error.

This should help https://github.com/meteor/meteor/issues/6952

Hi guys,

after upgrading from 1.4.1 to 1.4.2.3 I am also getting this error, when running meteor in 2 terminals

  1. meteor (standard)
  2. meteor test --driver-package practicalmeteor:mocha --port 3500
    ONE of them always throws an error, which totally sucks for my development workflow.

Yes, I do have some git submodules in packages/*.

Any ideas how to solve this?

This is the error I see when running 2) AFTER 1).

Error: ENFILE: file table overflow, scandir '/src/packages/flash-messages'
    at Error (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at Object.wrapper (/tools/fs/files.js:1535:35)
    at readDirectory (/tools/fs/watch.js:271:26)
    at Watcher._fireIfDirectoryChanged (/tools/fs/watch.js:410:23)
    at /tools/fs/watch.js:662:12
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/name/.meteor/packages/meteor-tool/.1.4.2_3.1ita38a++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Watcher._checkDirectories (/tools/fs/watch.js:651:7)
    at new Watcher (/tools/fs/watch.js:359:10)
    at setupClientWatcher (/tools/runners/run-app.js:786:23)
    at AppRunner._runOnce (/tools/runners/run-app.js:797:7)
    at AppRunner._fiber (/tools/runners/run-app.js:876:28)
    at /tools/runners/run-app.js:403:12

just had to downgrade to 1.4.1 after not being able to get it to work with the latest 1.4.2.3. What a timewaster :tired_face:

Check this issue: https://github.com/meteor/meteor/issues/8057

It solved the problem for me. For many of us the problem might be related to macOSx file limit.

Running this in the mac terminal worked for me: sudo launchctl limit maxfiles 16384 16384 && ulimit -n 16384

Stopping currently working meteor app worked for me.

2 Likes