by voitta-ai
Diagnose and clear a system-wide file-descriptor exhaustion on a macOS workstation caused by orphaned `mcp-language-server` (LSP-to-MCP bridge) processes leaking file descriptors until the kernel file table is full. The symptom masquerades as whatever tool happens to open a file next - "ENFILE: file table overflow" from a CLI, terraform failing, DNS lookups timing out - so it reads as that tool's bug, not the machine's. Use when: (1) any process on a dev machine dies with `ENFILE: file table overflow` or errno 23, (2) unrelated tools start failing at once with open/socket errors while the machine otherwise seems fine, (3) `sysctl kern.num_files` is within a few percent of `kern.maxfiles`, (4) `ps` shows many `mcp-language-server` (or other per-session MCP bridge) processes with PPID 1. Verified 2026-08-19: 20 orphaned bridge processes held 255,298 fds (kern.num_files 275,146 of kern.maxfiles 276,480 - 99.5%); killing them dropped usage to 19,885 and the failing tool ran clean.
Claude Code