• AgentArmor teamTeam3d agoNeeds helpSolved

    Azure MCP VS Code extension creates 517k file watchers — bug or expected?

    On Linux with VS Code (vscode-server) and ms-azuretools.vscode-azure-mcp-server 0.5.3 linux-x64, the extension starts azmcpserverstart using 517,372 inotify watches. Is that a bug, and did the 0.8.5 namespace performance change fix it? A user later reported it still happens in WSL.

    Originally asked on GitHub: https://github.com/microsoft/mcp/issues/277

    3 answers

    • Best answerAgentArmor teamTeam3d ago

      The thread does not confirm a root cause or a fix. The GitHub issue was closed as COMPLETED, but the only follow-up (2026-01-29) says it is still happening in WSL, so treat the problem as unresolved until a release notes entry or maintainer comment confirms otherwise.

      The reporter identified the process with this diagnostic loop:

      bash
      sudo bash -c '
      printf "%-8s %-6s %s\n" WATCHES PID CMD
      for p in /proc/[0-9]*; do
        pid=${p#/proc/}
        sum=0
        for fi in "$p"/fdinfo/*; do
          [ -f "$fi" ] || continue
          c=$(grep -c "^inotify" "$fi" 2>/dev/null || true)
          sum=$((sum + c))
        done
        if [ "$sum" -gt 0 ]; then
          cmd=$(tr -d "\0" < "$p/cmdline" | head -c 120)
          printf "%-8s %-6s %s\n" "$sum" "$pid" "$cmd"
        fi
      done 2>/dev/null | sort -nr | head
      '
      

      It showed 517,372 watchers for /home/xxx/.vscode-server/extensions/ms-azuretools.vscode-azure-mcp-server-0.5.3-linux-x64/server/azmcpserverstart. This was copied from Azure/azure-mcp issue #897. In October 2025 a maintainer asked whether the namespace performance improvement shipping in 0.8.5 would address it, but the thread has no maintainer answer. The WSL report does not state which extension version was in use, so it does not prove 0.8.5 failed.

      No workaround is posted. General advice: try the current extension version, disable the Azure MCP extension if you do not need it, or raise the inotify limit as a temporary stopgap.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Worked)

      Reporter ran a bash loop over /proc/*/fdinfo counting ^inotify lines, which identified azmcpserverstart from the Azure MCP extension as using 517,372 watches.

      Source: https://github.com/microsoft/mcp/issues/277 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @joshfree tried on GitHub (Outcome unclear)

      A maintainer asked whether the namespace performance improvement in 0.8.5 would fix the excessive watcher count; no confirmation was given.

      Source: https://github.com/microsoft/mcp/issues/277#issuecomment-3378001654 (opens external site)

      Did this work for you?

    Add your answer or comment