Open cardin opened 4 years ago
node -v
npm -v
npm ls officegen
.addImage(...)
.generate(...)
Should not crash.
officegen will crash with error EMFILE: too many open files
EMFILE: too many open files
Note that changing Linux file open limits in /etc/system/limits.conf does not help.
/etc/system/limits.conf
To fix this issue, please switch to using graceful-fs for your generation function
graceful-fs
npm install graceful-fs
./node_modules/officegen/lib/core/index.js
require("fs")
require("graceful-fs")
.: Success!
Environment
node -v
: 10.14.1npm -v
: 6.4.1npm ls officegen
: 0.6.3Steps to Reproduce
.addImage(...)
for 8000 times.generate(...)
Expected Behavior
Should not crash.
Actual Behavior
officegen will crash with error
EMFILE: too many open files
Note that changing Linux file open limits in
/etc/system/limits.conf
does not help.To fix this issue, please switch to using
graceful-fs
for your generation functionnpm install graceful-fs
./node_modules/officegen/lib/core/index.js
require("fs")
torequire("graceful-fs")
.: Success!