Error: EMFILE: too many open files
See original GitHub issueHello, how can i fix it?
[Error: EMFILE: too many open files, open 'C:\Users\HP\AppData\Roaming\gcloud\application_default_credentials.json'] {
errno: -4066,
code: 'EMFILE',
syscall: 'open',
path: 'C:\\Users\\HP\\AppData\\Roaming\\gcloud\\application_default_credentials.json'
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
node and Error: EMFILE, too many open files - Stack Overflow
After a number of searches I found a work around for the "too many open files" problem: var requestBatches = {}; function batchingReadFile(filename,...
Read more >EMFILE: too many open files, watch · Issue #923 - GitHub
i'm facing below issue while generating archive in xcode node:events:371 throw er; // Unhandled 'error' event ^ Error: EMFILE: too many open ......
Read more >How to fix the: "EMFILE: too many open files, watch" error in ...
A quick guide to how I solved a confusing React Native error. ... How to fix the: "EMFILE: too many open files, watch"...
Read more >SFDX Deploy error EMFILE: too many open files
SFDX Deploy error EMFILE: too many open files. Salesforce DX. Last updated 2021-10-12 ·Reference W-7848515 ·Reported By 73 users.
Read more >Backup failure due to OS error EMFILE "Too many open files"
Various symptoms may happen due to OS error EMFILE "Too many open files". Backup failure is one of them. You may see following...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@chsnt the problem isn’t the Translate client, I believe it’s this code:
This is going to open all files in parallel, so if there are many files in
dir
you might hit a maximum amount of concurrent open files at the operating system level.I would potentially rewrite this like:
☝️ this is pseudo code that would translate a file one at a time, assuming that
pbSubr.update
returns a promise.As an alternative to
async/await
you might also look at p-queue which allows you to control the amount of concurrency happening in your program.In general, you don’t want to perform a large amount of async work in a loop, because you’ll create a lot of open handles at once.
@bcoe Thanks for an answer I use translate like this:
(full code https://gist.github.com/chsnt/0d669b0a9509086dce829f8d0ae7257c )
translate.js