Crashes with "EMFILE: too many open files" on large projects
See original GitHub issueMy project has 35,085 files in 3,652 directories. When I load the web interface, it fails with:
Error: EMFILE: too many open files, open '/usr/local/lib/node_modules/codecrumbs/node_modules/watchpack/lib/DirectoryWatcher.js'
at Object.openSync (fs.js:448:3)
at Object.readFileSync (fs.js:348:35)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:809:20)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
at WatcherManager.getDirectoryWatcher (/usr/local/lib/node_modules/codecrumbs/node_modules/watchpack/lib/watcherManager.js:14:25)
at WatcherManager.watchDirectory (/usr/local/lib/node_modules/codecrumbs/node_modules/watchpack/lib/watcherManager.js:32:14)
macOS 10.14.3 Node 11.11.0 codecrumbs 0732382
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Error: EMFILE: too many open files - React Native CLI
On Windows the project was working perfectly but in Mac, after a few seconds of running the project with npm start, it crashed...
Read more >Fix 'EMFILE: too many open files' error in Jest - SeanMcP.com
When trying to run Jest in watch mode, this error may mean that you are missing a dependency.
Read more >error: emfile: too many open files open node js
Trying to build + test a huge project on Windows 10 x64. Fails with 'too many open files'. This should not happen. Works...
Read more >"EMFILE: too many open files" after upgrading to 0.15.6
Alas, I can't paste the debug info because I can't start the Obsidian – it hangs with the error message. WhiteNoise July 15,...
Read more >iOS : React Native Error: EMFILE: too many open files, watch
iOS : React Native Error: EMFILE : too many open files, watch [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s actually a Go project, for the most part. (I cloned the Java support files to add Go support. 😃
The biggest chunk of files, though, is a sub-directory containing a third party library I included in my project that has code in a variety of languages. I could easily exclude that if there were a command-line flag for it. The only directory in there that looks like codecrumbs could ignore as a rule is a Python site-packages directory.
Sorry, didn’t really have time to look at this, was working on other features 😃 just so you know, there is
-x
CLI parameter (see readme for details) you can use to exclude folders you don’t need (so there are less files)