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

Got "spawn cut EMFILE" on Ubuntu 18 #34

Closed
lolobosse opened this issue Aug 22, 2019 · 7 comments
Closed

Got "spawn cut EMFILE" on Ubuntu 18 #34

lolobosse opened this issue Aug 22, 2019 · 7 comments
Labels
bug Something isn't working properly help wanted Extra attention is needed solution inside

Comments

@lolobosse
Copy link

Describe the bug
I tried npkill and I got following error after few seconds
To Reproduce
Steps to reproduce the behavior:
$ npkill

  • OS: Ubuntu 18 LTS
  • Version 0.4.3

Additional context
ERROR:

      throw er; // Unhandled 'error' event
      ^

Error: spawn cut EMFILE
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
@zaldih zaldih added the bug Something isn't working properly label Aug 22, 2019
@hhuseyinpay
Copy link

hhuseyinpay commented Aug 22, 2019

I got the same error on osx 10.14.4 - (node v10.16.0)

@zaldih zaldih added the help wanted Extra attention is needed label Aug 22, 2019
@zaldih
Copy link
Member

zaldih commented Aug 22, 2019

Thank you very much for opening this report!
I recently noticed that sometimes (personally, infrequently), that error is thrown.

Npkill on unix systems invokes 2 commands to determine the size for each of the results found.
The cause seems to be due to an excess of simultaneous reading of files in that process.

I don't have much free time for now to be able to fix this, but here are two temporary solutions:

  • Start the analysis in a directory with fewer files.
  • By executing ulimit -n 10480 the error should stop appearing (ATTENTION I have not tried it or know what adverse effects it could have)

Similar problem

@zaldih
Copy link
Member

zaldih commented Aug 25, 2019

We have released version 0.5.0 🎊
We have controlled many types of exceptions, including the mentioned one.

Could you tell me if you can already use npkill?

I imagine there will be directories that show their space as "--"

@hhuseyinpay
Copy link

I guess the search cannot be completed. It stopped the search but search never completed successfully.
Screen Shot 2019-08-25 at 19 51 37

@ssimontis
Copy link

ulimit increases the number of open file handles you can have at one time. On OS X and certain Linux distros it is set to a lower value. If problems persist, try gradually increasing the number, or consider what other I/O intensive activities you may have going on.

@zaldih
Copy link
Member

zaldih commented Aug 27, 2019

@hhuseyinpay thanks for the reply!
Even in that state, can you use it normally or suffer from some kind of malfunction?

In any case, we will investigate further and correct it soon.

@zaldih
Copy link
Member

zaldih commented Oct 10, 2022

In this time the related methods have undergone many changes, so it should not be a problem today.
If it continues to be a problem, do not hesitate to reopen.

@zaldih zaldih closed this as completed Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly help wanted Extra attention is needed solution inside
Projects
None yet
Development

No branches or pull requests

4 participants