question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Linux] System.InvalidOperationException: object_op ---> System.IO.IOException: The configured user limit (128) on the number of inotify instances has been

See original GitHub issue

Issue Description

I’m gettings this error on a Linux Mint 19.2 machine. cat /proc/sys/fs/inotify/max_user_watches outputs 524288.

Steps to Reproduce

Opened a large Unity project on Linux.

Expected Behavior

No errors to be thrown.

Actual Behavior

An exception is thrown.

Logs

OmniSharp log

Post the output from Output-->Starting OmniSharp server at 9/19/2019, 10:32:02 PM Target: /home/vladius/Projects/magic-coins/MagicCoins.Unity/MagicCoins.Unity.sln

OmniSharp server started with Mono 6.0.0. Path: /home/vladius/.vscode/extensions/ms-vscode.csharp-1.21.3/.omnisharp/1.34.3/omnisharp/OmniSharp.exe PID: 13308

    Starting OmniSharp on linuxmint 19.2 (x64)
    DotNetPath set to dotnet
    Located 2 MSBuild instance(s)
        1: Mono 16.0 - "/usr/lib/mono/msbuild/Current/bin"
        2: StandAlone 16.0 - "/home/vladius/.vscode/extensions/ms-vscode.csharp-1.21.3/.omnisharp/1.34.3/omnisharp/.msbuild/Current/Bin"
    Registered MSBuild instance: Mono 16.0 - "/usr/lib/mono/msbuild/Current/bin"
        CscToolExe = csc.exe
        CscToolPath = /home/vladius/.vscode/extensions/ms-vscode.csharp-1.21.3/.omnisharp/1.34.3/omnisharp/.msbuild/Current/Bin/Roslyn
    Exception thrown while calling event sinks

System.InvalidOperationException: object_op —> System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached. at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0007b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool) at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x00184] in <f62d843bc8f04cc48580b577d5f0a74e>:0 --- End of inner exception stack trace --- at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x001a6] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.Start () [0x0001b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool) at Microsoft.AspNetCore.Razor.OmniSharpPlugin.MSBuildProjectDocumentChangeDetector.ProjectLoaded (OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs loadedArgs) [0x00266] in <8c6f4eb2e16d4051ba80a599aba81c54>:0 at OmniSharp.MSBuild.ProjectManager.ProcessQueue (System.Threading.CancellationToken cancellationToken) [0x00198] in <66e377b85a4d44b3a9b82d0e2eafa257>:0 info: OmniSharp.MSBuild.ProjectManager Update project: Turbanov.Toolworks.Schweizer.Runtime.Tests [warn]: OmniSharp.MSBuild.ProjectManager Unable to resolve assembly ‘/home/vladius/Projects/magic-coins/MagicCoins.Unity/Temp/bin/Debug/Turbanov.Toolworks.Schweizer.Runtime.dll’ fail: OmniSharp.MSBuild.ProjectManager Exception thrown while calling event sinks System.InvalidOperationException: object_op —> System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached. at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0007b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool) at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x00184] in <f62d843bc8f04cc48580b577d5f0a74e>:0 --- End of inner exception stack trace --- at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x001a6] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.Start () [0x0001b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool) at Microsoft.AspNetCore.Razor.OmniSharpPlugin.MSBuildProjectDocumentChangeDetector.ProjectLoaded (OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs loadedArgs) [0x00266] in <8c6f4eb2e16d4051ba80a599aba81c54>:0 at OmniSharp.MSBuild.ProjectManager.ProcessQueue (System.Threading.CancellationToken cancellationToken) [0x00198] in <66e377b85a4d44b3a9b82d0e2eafa257>:0 info: OmniSharp.MSBuild.ProjectManager Update project: Turbanov.Toolworks.Schweizer.Runtime fail: OmniSharp.MSBuild.ProjectManager Exception thrown while calling event sinks System.InvalidOperationException: object_op —> System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached. at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0007b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool) at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x00184] in <f62d843bc8f04cc48580b577d5f0a74e>:0 --- End of inner exception stack trace --- at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x001a6] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.Start () [0x0001b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool) at Microsoft.AspNetCore.Razor.OmniSharpPlugin.MSBuildProjectDocumentChangeDetector.ProjectLoaded (OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs loadedArgs) [0x00266] in <8c6f4eb2e16d4051ba80a599aba81c54>:0 at OmniSharp.MSBuild.ProjectManager.ProcessQueue (System.Threading.CancellationToken cancellationToken) [0x00198] in <66e377b85a4d44b3a9b82d0e2eafa257>:0 info: OmniSharp.MSBuild.ProjectManager Update project: Turbanov.Toolworks.UIniverse.Editor [warn]: OmniSharp.MSBuild.ProjectManager Unable to resolve assembly ‘/home/vladius/Projects/magic-coins/MagicCoins.Unity/Temp/bin/Debug/Turbanov.Toolworks.Schweizer.Editor.dll’ [warn]: OmniSharp.MSBuild.ProjectManager Unable to resolve assembly ‘/home/vladius/Projects/magic-coins/MagicCoins.Unity/Temp/bin/Debug/Turbanov.Toolworks.Schweizer.Runtime.dll’ [warn]: OmniSharp.MSBuild.ProjectManager Unable to resolve assembly ‘/home/vladius/Projects/magic-coins/MagicCoins.Unity/Temp/bin/Debug/Turbanov.Toolworks.UIniverse.dll’ fail: OmniSharp.MSBuild.ProjectManager Exception thrown while calling event sinks System.InvalidOperationException: object_op —> System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached. at System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () [0x0007b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () [0x00019] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0001d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool) at System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) [0x00048] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x00184] in <f62d843bc8f04cc48580b577d5f0a74e>:0 --- End of inner exception stack trace --- at System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action4[T1,T2,T3,T4] map_op, System.Action2[T1,T2] object_op, System.Object handle, System.Action2[T1,T2] cancel_op) [0x001a6] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) [0x00004] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.Start () [0x0001b] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) [0x0003d] in <f62d843bc8f04cc48580b577d5f0a74e>:0 at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool) at Microsoft.AspNetCore.Razor.OmniSharpPlugin.MSBuildProjectDocumentChangeDetector.ProjectLoaded (OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs loadedArgs) [0x00266] in <8c6f4eb2e16d4051ba80a599aba81c54>:0 at OmniSharp.MSBuild.ProjectManager.ProcessQueue (System.Threading.CancellationToken cancellationToken) [0x00198] in <66e377b85a4d44b3a9b82d0e2eafa257>:0 info: OmniSharp.MSBuild.ProjectManager Update project: Turbanov.Toolworks.UIniverse [warn]: OmniSharp.MSBuild.ProjectManager Unable to resolve assembly ‘/home/vladius/Projects/magic-coins/MagicCoins.Unity/Temp/bin/Debug/Turbanov.Toolworks.Schweizer.Runtime.dll’ fail: OmniSharp.MSBuild.ProjectManager Exception thrown while calling event sinks

C# log

Empty

Environment information

VSCode version: 1.38.1 C# Extension: 1.21.3

Mono Information OmniSharp using global mono :6.0.0
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 2.2.402 Commit: c7f2f96116

Runtime Environment: OS Name: linuxmint OS Version: 19.2 OS Platform: Linux RID: linuxmint.19.2-x64 Base Path: /usr/share/dotnet/sdk/2.2.402/

Host (useful for support): Version: 2.2.7 Commit: b1e29ae826

.NET Core SDKs installed: 2.2.402 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
code-settings-sync Shan 3.4.2
code-spell-checker streetsidesoftware 1.7.18
code-spell-checker-russian streetsidesoftware 0.2.2
csharp ms-vscode 1.21.3
csharpextensions jchannon 1.3.0
docomment k–kato 0.1.8
doxdocgen cschlosser 0.5.0
Doxygen bbenoist 1.0.0
gc-excelviewer GrapeCity 2.1.32
git-easy bibhasdn 1.11.0
git-project-manager felipecaputo 1.7.1
gitblame waderyan 3.0.1
gitconfig sidneys1 2.0.1
githd huizhou 2.1.0
githistory donjayamanne 0.4.6
gitlens eamodio 9.9.3
html-css-class-completion Zignd 1.19.0
JavaScriptSnippets xabikos 1.7.2
jinja wholroyd 0.0.8
MagicPython magicstack 1.1.0
node-module-intellisense leizongmin 1.5.0
nodejs-extension-pack waderyan 0.1.9
npm-intellisense christian-kohler 1.3.0
path-intellisense christian-kohler 1.4.2
prettier-vscode esbenp 2.2.2
psi-header psioniq 1.8.0
python ms-python 2019.9.34911
search-node-modules jasonnutter 1.3.0
unity-code-snippets kleber-swf 1.3.0
unity-debug Unity 2.7.2
vscode-csharp-snippets jorgeserrano 0.3.1
vscode-eslint dbaeumer 1.9.1
vscode-languagetool adamvoss 3.8.0
vscode-npm-script eg2 0.3.9

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:12
  • Comments:5

github_iconTop GitHub Comments

1reaction
awilkinscommented, May 17, 2022

This isn’t about the number of user watches : it’s about the number of inotify instances.

❯ inotify-consumers 

   INOTIFY   INSTANCES
   WATCHES      PER   
    COUNT     PROCESS   PID USER         COMMAND
------------------------------------------------------------
    1751        45      162774 awilkins    /home/awilkins/.vscode/extensions/ms-dotnettools.csharp-1.24.4-linux-x64/.omnisharp/1.38.2/bin/mono /home/awilkins/.vscode/extensions/ms-dotnettool
    2387         5      162718 awilkins    /home/awilkins/.vscode/extensions/ms-dotnettools.csharp-1.24.4-linux-x64/.razor/rzls -lsp --trace 0
    1748         1        4011 awilkins    /usr/bin/syncthing -no-browser
    1413         1        3153 awilkins    /usr/libexec/tracker-miner-fs
     542         2      162284 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node /usr/share/code/resources/app/out/bootstrap-fork --type=fileWatcher
     113         6        3145 awilkins    /lib/systemd/systemd --user
      91         1        3588 awilkins    /usr/lib/unity-settings-daemon/unity-settings-daemon
      84         1        3409 awilkins    /usr/libexec/xdg-desktop-portal-gtk
      25         1        4135 awilkins    /usr/libexec/gvfsd-trash --spawner :1.4 /org/gtk/gvfs/exec_spaw/0
      25         1        3932 awilkins    /snap/snap-store/558/usr/bin/snap-store --gapplication-service
      13         1       10761 awilkins    update-notifier
      11         1        4287 awilkins    nemo-desktop
       9         1        9874 awilkins    zeitgeist-datahub
       8         2        3854 awilkins    /usr/bin/compiz
       8         1       12153 awilkins    /usr/lib/thunderbird/thunderbird
       8         1       10023 awilkins    /usr/lib/firefox/firefox
       7         1        9893 awilkins    /usr/lib/zeitgeist/zeitgeist-fts
       6         3      162082 awilkins    /usr/share/code/code --enable-crashpad gpconnect-user-portal
       6         1       14221 awilkins    /usr/bin/unity-scope-loader applications/applications.scope applications/scopes.scope commands.scope
       5         1        3584 awilkins    /usr/lib/x86_64-linux-gnu/indicator-sound/indicator-sound-service
       5         1        3579 awilkins    /usr/lib/x86_64-linux-gnu/indicator-messages/indicator-messages-service
       5         1        3577 awilkins    /usr/lib/x86_64-linux-gnu/indicator-datetime/indicator-datetime-service
       4         2       48517 awilkins    /usr/share/discord/Discord
       4         2       27218 awilkins    /usr/share/teams/teams --disable-namespace-sandbox --disable-setuid-sandbox
       4         2       17855 awilkins    /usr/lib/slack/slack --enable-crashpad
       4         1        3574 awilkins    /usr/lib/x86_64-linux-gnu/bamf/bamfdaemon
       4         1        3164 awilkins    /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
       3         1      162937 awilkins    /usr/lib/jvm/java-11-amazon-corretto/bin/java -jar /home/awilkins/.vscode/extensions/sonarsource.sonarlint-vscode-3.4.1/server/sonarlint-ls.jar 394
       3         1      162806 awilkins    /home/awilkins/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5561/dotnet_modules/vsls-agent --autoexit --enableRpcInitialize --pipe vscode.7b81
       3         1      162805 awilkins    /bin/sh -c "/home/awilkins/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5561/dotnet_modules/vsls-agent" --autoexit --enableRpcInitialize --pip
       3         1      162768 awilkins    bash /home/awilkins/.vscode/extensions/ms-dotnettools.csharp-1.24.4-linux-x64/.omnisharp/1.38.2/run -z -s /home/awilkins/gpconnect/gpconnect-user-p
       3         1      162737 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node /home/awilkins/.vscode/extensions/redhat.fabric8-analytics-0.3.5/dist/server.js --node-ipc --
       3         1      162649 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node /home/awilkins/.vscode/extensions/ms-azuretools.vscode-docker-1.22.0/dist/compose-language-se
       3         1      162644 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node /home/awilkins/.vscode/extensions/ms-azuretools.vscode-docker-1.22.0/dist/dockerfile-language
       3         1      162631 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node /home/awilkins/.vscode/extensions/redhat.vscode-yaml-1.7.0/dist/languageserver.js --node-ipc 
       3         1      162611 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node /home/awilkins/.vscode/extensions/mtxr.sqltools-0.23.0/dist/languageserver.js --node-ipc --cl
       3         1      162603 awilkins    /home/awilkins/nvim/bin/nvim -N --embed -c source /home/awilkins/.vscode/extensions/asvetliakov.vscode-neovim-0.0.84/vim/vscode-options.vim --cmd s
       3         1      162216 awilkins    /usr/share/code/code --ms-enable-electron-run-as-node --inspect-port=0 /usr/share/code/resources/app/out/bootstrap-fork --type=extensionHost --skip
       3         1       14272 awilkins    /usr/share/spotify/spotify
       2         2        3605 awilkins    /usr/libexec/gnome-session-binary --systemd --builtin --session=unity
       2         2        3151 awilkins    /usr/bin/pulseaudio --daemonize=no --log-target=journal
       2         2       27464 awilkins    /usr/share/teams/teams --type=renderer --autoplay-policy=no-user-gesture-required --disable-background-timer-throttling --field-trial-handle=138244
       2         1       48561 awilkins    /usr/share/discord/Discord --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=11819744161397342864,535497400513036
       2         1        3658 awilkins    /usr/libexec/evolution-source-registry
       2         1        3325 awilkins    /usr/bin/ibus-daemon --daemonize --xim
       2         1       27262 awilkins    /usr/share/teams/teams --type=utility --utility-sub-type=network.mojom.NetworkService --field-trial-handle=13824464907744343692,3232629623915110335
       2         1       17897 awilkins    /usr/lib/slack/slack --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-GB --service-sandbox-type=none --enable-logging --ena
       2         1      162151 awilkins    /usr/share/code/code --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-GB --service-sandbox-type=none --enable-crashpad --cr
       2         1       14305 awilkins    /usr/share/spotify/spotify --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --l
       1         1        3896 awilkins    /usr/bin/moolticute --autolaunched
       1         1        3677 awilkins    /usr/libexec/evolution-addressbook-factory
       1         1        3668 awilkins    /usr/libexec/evolution-calendar-factory
       1         1        3377 awilkins    /usr/libexec/ibus-engine-simple
       1         1        3361 awilkins    /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
       1         1        3346 awilkins    /usr/libexec/ibus-portal
       1         1        3343 awilkins    /usr/libexec/ibus-x11 --kill-daemon
       1         1        3341 awilkins    /usr/libexec/ibus-extension-gtk3
       1         1        3338 awilkins    /usr/libexec/ibus-ui-gtk3
       1         1        3335 awilkins    /usr/libexec/ibus-memconf
       1         1        3317 awilkins    /usr/libexec/gvfs-afc-volume-monitor
       1         1        3312 awilkins    /usr/libexec/goa-identity-service
       1         1        3266 awilkins    /usr/libexec/goa-daemon
       1         1        3213 awilkins    /usr/libexec/gvfs-udisks2-volume-monitor
       1         1       16271 awilkins    /usr/libexec/gnome-terminal-server
       1         1      162235 awilkins    /usr/share/code/code --type=renderer --enable-crashpad --crashpad-handler-pid=162130 --enable-crash-reporter=3a871671-b332-4d29-80d8-8265188eb7ef,n
       1         1       15922 awilkins    /usr/bin/python3 /usr/bin/pasaffe
       1         1      151411 awilkins    /usr/bin/python3 /usr/bin/update-manager --no-update --no-focus-on-map
       1         1       14219 awilkins    /usr/lib/x86_64-linux-gnu/unity-lens-files/unity-files-daemon

    8365  WATCHES TOTAL COUNT

INotify instances per user (e.g. limits specified by fs.inotify.max_user_instances): 

INSTANCES    USER
-----------  ------------------
131          awilkins

❯ cat /proc/sys/fs/inotify/max_user_instances 
128

Most processes that use inotify use one instance. Even systemd only consumes 6 inotify instances.

Omnisharp is consuming 45 (and rzls is consuming another 5 - is this to do with how .NET handles file watching?).

The quick kludge is to bump max_user_instances to a higher number, but this level of consumption still looks excessive.

1reaction
lonix1commented, Dec 30, 2021

I recently discovered that when restarting vscode (usualy after a debugger crash) the plugin also crashes and remains in memory. This can be verified using ps aux | grep dotnettools, and/or a tool that counts inotify watches.

So we need to kill those processes to release the watches. Then vscode can be started normally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Asp.Net Core - The configured user limit (128) on the number ...
The best solution I found so far is to increase the fs.inotify.max_user_instances in /etc/sysctl.conf by running this command:
Read more >
.NET Core: The configured user limit (128) on the number of ...
System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of...
Read more >
The configured user limit (128) on the number of inotify ...
System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached. #8449.
Read more >
Inotify Instances Limit Has Been Reached - Anthony Liriano
System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the ...
Read more >
The configured user limit (128) on the number of inotify ...
System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found