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)
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 EMFILEimage processing command(exited with error code EMFILE)Can this be avoided? I'm thinking of how the npm package
graceful-fsfixes this problem forfs. Can the same thing be done inchild-process-promise?I have set my number of concurrent files open to 10480 (
ulimit -n)