Watchman 在 macOS 上启动数千个进程
作者: Manbeardo创建于 2025年10月3日更新于 2026年5月30日
Every once in a while, after an OS reboot, something goes horribly wrong with watchman. When I open VS Code, the Sapling extension queries watchman and suddenly there are several thousand watchman processes and the filesystem gets overwhelmed. Everything that needs to read or write files anywhere becomes painfully slow. It takes ~30s to get a prompt in my terminal. For whatever reason, watchman seems to recover and go back to a single process if I kill all the processes with `pkill -9 watchman`, but that takes a few minutes to run and finding/remembering the command is difficult when the entire system is responding so slowly. Here's a sample of the output from `ps -A | grep watchman` while the problem was ongoing:
内容来源: facebook/watchman