emacs-async icon indicating copy to clipboard operation
emacs-async copied to clipboard

Too many open files

Open weak-head opened this issue 6 years ago • 4 comments

After enabling asynchronous compilation

(use-package async
  :ensure t
  :demand t
  :init (setq async-bytecomp-allowed-packages '(all))
  :config (async-bytecomp-package-mode 1))

I'm having Too many open files for clean initialization from scratch:

Error (use-package): Failed to install magit: Failed to verify signature: file-error, "Creating process pipe", "Too many open files"
Error (use-package): Failed to install ssh-agency: Creating pipe: Too many open files
Error (use-package): Failed to install company-go: Creating pipe: Too many open files
Error (use-package): Failed to install go-eldoc: Creating pipe: Too many open files
Error (use-package): Failed to install google-this: Creating pipe: Too many open files
Error (use-package): Failed to install haskell-mode: Creating pipe: Too many open files
Error (use-package): Failed to install haskell-snippets: Creating pipe: Too many open files
Error (use-package): Failed to install hlint-refactor: Creating pipe: Too many open files
Error (use-package): Failed to install intero: Creating pipe: Too many open files
Error (use-package): Failed to install company-cabal: Creating pipe: Too many open files
Error (use-package): Failed to install cmm-mode: Creating pipe: Too many open files
Error (use-package): Failed to install helm: Creating pipe: Too many open files
...

Emacs 25.3.1, win10 enterprise

weak-head avatar Feb 05 '18 19:02 weak-head

Wikipedia states that SUA has been deprecated in Windows 8 and has been removed in Windows 8.1.

Looks like this is the reason why HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Services for Unix DWORD entry called MaxOpenFiles has no effect.

Is there any workaround for this or this is a limitation and there is not way to effectively use emacs-async on Windows?

weak-head avatar Feb 05 '18 21:02 weak-head

I rather think that emacs-async needs a way to throttle the number of async processes it will ever create at one time.

jwiegley avatar Feb 05 '18 22:02 jwiegley

I have a little function advise that can be used to limit number of async processes. Share here if anyone need. https://gist.github.com/kiennq/cfe57671bab3300d3ed849a7cbf2927c

kiennq avatar Nov 22 '19 15:11 kiennq

I have a little function advise that can be used to limit number of async processes. Share here if anyone need. https://gist.github.com/kiennq/cfe57671bab3300d3ed849a7cbf2927c

I was running into exactly this issue with your emacs-k scoop build @kiennq - on Windows 10 insiders developer channel (build 21382.1).

The code you have shared certainly helps with melpa updates, but it looks like I'm now running into the same issue with the native-compilation async compilation processes.

P.S. I ran into this code snippet which shows how to limit the number of compilation processes: https://ddavis.io/posts/emacs-native-centos7/#deferred-and-asynchronous-compilation (you have to prepend native- to the variables) and now emacs-k s eems to be running.

Thank you!

cpbotha avatar May 18 '21 07:05 cpbotha