-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Ionide/VSCode consuming all of my inotify instances #1984
Comments
Hello 128 inotify instance doesn't seems like a loot. If possible you can increase that limit: https://dev.to/rubiin/ubuntu-increase-inotify-watcher-file-watch-limit-kf4 I am not sure if this will helps, but in general on Unix system I set .NET to use Polling for watching files. You can do that by this setting |
I understand your perspective here, and I'm aware I'd be able to adjust that limit or force it to use a different polling mechanism, but this is the first time I've ever been confronted with this as a problem, and Ionide isn't the only program I run that relies on inotify. From my perspective this is a clear bug somewhere (whether its a bug in vscode itself or Ionide I can't say), and it shouldn't be consuming 120-some inotify instances just to work on one project in one instance of vscode. 128 instances is the default setting, and for most people running watchers they'll never even come close to that limit if the programs they're running make correct use of this resource. |
Also 128 is just the upper bound it ran into where it couldn't spawn any more inotify instances. If something is going haywire and continuing to try and create them even setting it to 600 wouldn't solve the problem - it would just cause Ionide to eventually be consuming 600 inotify instances. |
I don't know from my experience VSCode/Ionide is not the only program that has this issues on my machines that's why I proposed to increase the limit. For now this is a workaround until someone has an idea how to debug this issue or fix it. |
Since we use FileSystemWatcher for changes to fsproj and related files it's a dotnet runtime issue. dotnet/runtime#62869 |
Yeah, but if I understand the API correctly that implies one FileSystemWatcher is one inotify instance? If so, shouldn't Ionide only ever be creating one FileSystemWatcher at a time? Meaning, is something not disposing of FileSystemWatcher's when it should be? |
No, we create |
Well, in this case I only had one vscode instance open with a slightly modified solution based on https://github.com/elmish/templates/tree/master. Not a large project. I'm testing out Fable for the first time, and then boom I find that Ionide has hogging all of my system's inotify instances. |
Describe the bug
When starting watchers like
dotnet watch
orvite
I get errors on my linux system because something is consuming all of my 128 inotify instances.Further analysis shows that Ionide seems to be consuming most of them:
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
/usr/bin/dotnet/home/user/.vscode/extensions/ionide.ionide-fsharp-7.18.0/bin/net7.0/fsautocomplete.dll--state-directory/home/user/.config/Code/User/workspaceStorage/700616795669794e7b1ffe09d82c0eb9/Ionide.Ionide-fsharp
...
Machine info
Additional context
I've had this instance of vscode open for a while. I'm not sure what triggers this situation to happen, but something appears to be spinning up lots and lots of instances of this fsautocomplete.dll thing and is consuming all of my inotify instances.
The text was updated successfully, but these errors were encountered: