1. inotify 数到顶
1 | [2015-12-11 18:36:39.195][error][command:f648a06d-621e-465f-9793-2c2ed5c60cfd][tid:13][com.facebook.buck.util.WatchmanWatcher] Error in Watchman output. Posting an overflow event to flush the caches |
打开它推荐的页https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch,它说的原因可能有两个
####
1. The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource
2. Insufficient kernel memory was available
buck 的watchman背后的应该就是使用inotify来监控,出现这个问题应该跟buck与watchman本身无关,再查看另一个facebook的文档https://facebook.github.io/watchman/docs/install.html#system-specific-preparation里面,提到linux里的三个配置项
- /proc/sys/fs/inotify/max_user_instances impacts how many different root dirs you can watch.
- /proc/sys/fs/inotify/max_user_watches impacts how many dirs you can watch across all watched roots.
- /proc/sys/fs/inotify/max_queued_events impacts how likely it is that your system will experience a notification overflow.
按我当前的错误提示来看应该是max_user_watches数到顶了,/proc/sys/fs/inotify/max_user_watches默认是8192,直接echo一个更大的数进去就可以了.