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

Linux: cannot watch large folders (ENOSPC) #4252

Closed
isidorn opened this issue Mar 15, 2016 · 17 comments
Closed

Linux: cannot watch large folders (ENOSPC) #4252

isidorn opened this issue Mar 15, 2016 · 17 comments
Assignees
Labels
file-watcher File watcher linux Issues with VS Code on Linux

Comments

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2016

  • VSCode Version: c4b5142
  • OS Version: Linux

Steps to Reproduce:

  1. git clone https://github.com/Microsoft/TypeScript.git
  2. you do not have to open any file, just wait a minute and notice multiple errors in developer console
  3. I do not see this on OS X, only linux

Marking as important as I am not sure what does this potentially break. Extension host might be crashing.

screen shot 2016-03-15 at 14 50 14

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority linux Issues with VS Code on Linux labels Mar 15, 2016
@bpasero
Copy link
Member

bpasero commented Mar 15, 2016

@isidorn this means the watcher is running out of handles, does the advise in http://code.visualstudio.com/Docs/supporting/faq#_linux-faq help?

@bpasero bpasero added this to the April 2016 milestone Mar 15, 2016
@isidorn
Copy link
Contributor Author

isidorn commented Mar 15, 2016

@bpasero that does not help, as my linux has that configured since forever

@bpasero
Copy link
Member

bpasero commented Mar 15, 2016

@isidorn I think we are hitting the limits of what the OS can do...

@bpasero bpasero changed the title service library watcher errors Linux: cannot watch large folders (ENOSPC) Mar 15, 2016
@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

@bpasero have you looked into Watchman by Facebook? That's what ember-cli uses.

@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

@Tyriar post GA I want to look into other options for watching on Mac/Linux. Though I believe if we change to adding watched folders one by one as needed by the UI, we can keep using chokidar. The expensive part in chokidar is watching large root folders recursively.

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

@bpasero I actually just ran into an ENOSPC when trying to build with gulp watch while running a single instance of code ~. That's an enormous amount of files/processing when only a tiny subset of the files are likely being worked on. Seems like a good route to follow.

@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

@Tyriar if you can find out any way to prevent this issue by increasing the file limit on Linux, we should update the existing entry at http://code.visualstudio.com/Docs/supporting/faq#_linux-faq

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

@bpasero Any reason the number is so small in the FAQ? It's apparently capable of much more http://stackoverflow.com/a/17437601/1156119

@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

@Tyriar good point! does it work with a higher number?

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

@bpasero yeah that fixes it. I'll update the docs, I'll also add how to load in the new config value without restarting.

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

Users should also be notified in a nicer way that this is how they increase the value. While we could do this set up as part of the .deb/.rpm packages, I would prefer to stay away from messing with global config files like that.

@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

@Tyriar nice, yes please update the docs. I think this is not a good situation to be in, so my suggested way forward is to reduce the number of file handles the watcher needs to install.

@bpasero bpasero removed the important Issue identified as high-priority label Mar 17, 2016
@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

@bpasero 👍

Should you close this off (since it's solved by microsoft/vscode-docs#236) and make a new issue to explicitly stop watching entire directories trees when they're too large?

@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

I will leave this open and cleanup post GA, I have a bunch of watcher related issues for April.

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2016

Sounds good, I just put the docs PR up microsoft/vscode-docs#237.

@bpasero
Copy link
Member

bpasero commented Mar 17, 2016

👍

@bpasero
Copy link
Member

bpasero commented Mar 30, 2016

Will be addressed in #3998

@bpasero bpasero closed this as completed Mar 30, 2016
@bpasero bpasero removed this from the April 2016 milestone Mar 30, 2016
@bpasero bpasero removed the bug Issue identified by VS Code Team member as probable bug label Mar 30, 2016
@bpasero bpasero added the file-watcher File watcher label Jun 8, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
file-watcher File watcher linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

3 participants