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

Error: EMFILE: too many open files #1946

Open
codermapuche opened this issue Jan 28, 2024 · 1 comment
Open

Error: EMFILE: too many open files #1946

codermapuche opened this issue Jan 28, 2024 · 1 comment
Labels

Comments

@codermapuche
Copy link

Describe the bug
When run svgo recursive into a foler tree with huge of vectors files get EMFILE: too many open files

To Reproduce
Have a vectors folder with huge ammount of svg files and run:
svgo -f vectors --multipass --pretty -r
Get:
Error: EMFILE: too many open files, open 'cloudy-day.svg'

Expected behavior
Run over all files

Desktop (please complete the following information):

  • SVGO Version 3.2.0
  • NodeJs Version v16.13.0
  • OS: Windows 10, 64bits
codermapuche added a commit to codermapuche/svgo that referenced this issue Jan 28, 2024
Optimize a large number of vectors sequentially instead of parallel to avoid the simultaneously opened file limit
@XhmikosR
Copy link
Contributor

XhmikosR commented Jan 31, 2024

My 2 cents: I've hit this issue in the past with other tools and it seems that using graceful-fs was a quick way to fix the issue.

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

No branches or pull requests

2 participants