Skip to content

EMFILE error - can be avoided? #29

Description

@commanda

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions