-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Show message if insufficient file watcher handles #8458
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to trigger the message using sudo sysctl -w fs.inotify.max_user_watches=16
, and got no message once the value was high enough.
Although it might be unrelated to this change, but when clicking on the Instructions
link it opened the same tab 4 times instantly.
}); | ||
await watcher.start(); | ||
} catch (error) { | ||
if (error.message === 'NSFW was unable to start watching that directory.') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know how to land in this state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the error I was getting back when I first worked on this. After rebasing etc I started getting the Inotify message in the callback. It may have been a bad build. I was never happy with this code here, and the message is too generic so may be caused by other problems, perhaps on Windows and Mac. I will spend more time seeing if I hit this code again and, if not, I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now removed this check as I cannot reproduce the condition that caused it. I also removed the link to instructions in the browser version as the user can't change the inotify limit on the server.
7894536
to
cef8236
Compare
I have not seen that but, looking at the code, it is clear what the problem is. |
cef8236
to
616daaf
Compare
CHANGELOG.md
Outdated
@@ -11,7 +11,7 @@ | |||
- This change triggers the context menu for a given shell tab-bar without the need to activate it | |||
- While registering a command, `Event` should be passed down, if not passed, then the commands will not work correctly as they no longer rely on the activation of tab-bar | |||
- [core] Moved `findTitle()` and `findTabBar()` from `common-frontend-contribution.ts` to `application-shell.ts` [#6965](https://github.com/eclipse-theia/theia/pull/6965) | |||
|
|||
- [core] show Linux users a warning when Inotify handles have been exhausted, with link to instructions on how to fix [#8458](https://github.com/eclipse-theia/theia/pull/8458) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[filesystem]
f0b40ca
to
7ea3cdf
Compare
Signed-off-by: Nigel Westbury <[email protected]>
What it does
Fixes #938
On Linux the limit for the number of directories that can be watched is by default 8192. Furthermore, if a watched directory has sub-directories then each sub-directory is counted in this limit. When this limit is reached, the user is not told. They simply don't see changes.
This PR shows a message to the user together with instructions on how to increase the limit.
How to test
On Linux, set the limit to 8192 (the default) and check that a message appears when the limit is reached.
Check that the message does not appear when the limit is larger, or on Windows or Mac. Test file watching and filesystem provider plugins to ensure nothing is broken.
Check that it is fine to link to vscode's page, or suggest Theia's own page.
Review checklist
Reminder for reviewers