Skip to content
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 error - can be avoided? #29

Open
commanda opened this issue Dec 5, 2016 · 0 comments
Open

EMFILE error - can be avoided? #29

commanda opened this issue Dec 5, 2016 · 0 comments

Comments

@commanda
Copy link

commanda commented Dec 5, 2016

I have a large job which runs Promise.all on a bunch of files, which in turn each refer to a bunch of image files. On these, I call child-process-promise.exec(image processing command). As there's not a good way to estimate the number of images to be processed, I'm frequently running into a EMFILE error:
Error: spawn /bin/sh EMFILE image processing command (exited with error code EMFILE)

Can this be avoided? I'm thinking of how the npm package graceful-fs fixes this problem for fs. Can the same thing be done in child-process-promise?

I have set my number of concurrent files open to 10480 (ulimit -n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant