-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EMFILE: too many open files #146
EMFILE: too many open files #146
Comments
Thanks for reporting this @rperryng I also could not see any place where graceful-fs is not used. But I just noticed that it does not patch But even if I were to change it back to using error-first-callbacks, or to promisify the fs-graceful code, I'm not sure if the issue with I will try to get hold of a macbook, and look into fixing this next week. You don't happen to have an error message that will print a line number? That way it would be easier to guess where the problem occurs. |
Ah, sorry about that I should have included the full error message I was getting (there wasn't too much more to it):
Your point about |
Oh, another note: The 3.x versions should not raise the EMFILE error. |
This issue was fixed with v4.0.4 and it should no longer be the main reason for anyone to stay on the 3.x versions. |
Thanks for all your work! I appreciate it :) |
Hey there,
I'm trying to use
node-folder-hash
as a means of validating whether the$(yarn cache dir)
folder gets modified after restoring this cache folder (in CI) and runningyarn install
, so that I can avoid re-saving the (large) cache folder if it's unchanged. However, I ran into this errorEMFILE: too many open files error
. I was able to reproduce this locally by runninghashElement
on a folder that contains 200 copies ofexpressJS
From reading the source code, I see that
hashElement
is pre-configured to usegraceful-fs
, andgraceful-fs
apparently deals withEMFILE: too many open files
by queueing/retryingreaddir
calls whenEMFILE
is encountered.Could this be an issue with the way
node-folder-hash
is usinggraceful-fs
? The only caveat I see in their docs is that the asynchronous APIs must be used to get these benefits, but it seems only thefs.promises
module is used so I would think it should be ok.The text was updated successfully, but these errors were encountered: