The current npm latest (@colbymchenry/codegraph@0.9.9) can still exhaust the macOS system-wide file table when codegraph serve --mcp starts on a large project. main appears to already contain the fix in c9559d9 / #650, but that change is not yet in the published npm package.
Observed on macOS 14.8.5 / Apple Silicon with the npm-installed 0.9.9 package:
- System proxy/network apps started failing; Feishu/Lark and WeChat showed no network signal.
- macOS reported
Too many open files in system (os error 23) for new processes.
sysctl kern.maxfiles kern.num_files showed kern.num_files: 122426 with kern.maxfiles: 122880.
lsof showed two codegraph serve --mcp processes holding most of the system file table:
- one process with about
61,434 open fds, 61,419 of them REG
- another process with about
54,508 open fds, 54,495 of them REG
- After terminating those
codegraph serve --mcp processes, kern.num_files dropped back to about 6,381 and other apps recovered.
The installed 0.9.9 dist still references the older chokidar watcher path, while repository main has the native fs.watch hybrid watcher and the CHANGELOG entry describing the macOS per-file fd exhaustion fix.
Could you publish a new release containing #650 / c9559d9? This is a high-impact operational issue because it can break unrelated applications system-wide on macOS once the file table is exhausted.
Workaround for affected users until a release is published: stop stale codegraph serve --mcp processes and install/build from main, or disable the daemon/watcher temporarily.
The current npm
latest(@colbymchenry/codegraph@0.9.9) can still exhaust the macOS system-wide file table whencodegraph serve --mcpstarts on a large project.mainappears to already contain the fix inc9559d9/ #650, but that change is not yet in the published npm package.Observed on macOS 14.8.5 / Apple Silicon with the npm-installed 0.9.9 package:
Too many open files in system (os error 23)for new processes.sysctl kern.maxfiles kern.num_filesshowedkern.num_files: 122426withkern.maxfiles: 122880.lsofshowed twocodegraph serve --mcpprocesses holding most of the system file table:61,434open fds,61,419of themREG54,508open fds,54,495of themREGcodegraph serve --mcpprocesses,kern.num_filesdropped back to about6,381and other apps recovered.The installed
0.9.9dist still references the older chokidar watcher path, while repositorymainhas the nativefs.watchhybrid watcher and the CHANGELOG entry describing the macOS per-file fd exhaustion fix.Could you publish a new release containing #650 /
c9559d9? This is a high-impact operational issue because it can break unrelated applications system-wide on macOS once the file table is exhausted.Workaround for affected users until a release is published: stop stale
codegraph serve --mcpprocesses and install/build frommain, or disable the daemon/watcher temporarily.