码迷,mamicode.com
首页 > 其他好文 > 详细

Listen error 错误和 limit of inotify watches was reached

时间:2018-07-12 01:05:09      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:hub   nal   error:   sys   another   visit   news   amount   you   

今天在生产环境中报错rails c中报了一个错误:

FATAL: Listen error: unable to monitor directories for changes.
Visit https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers for info on how to fix this.

  报错后想看一下错误日志显示如下:

tailf: log/xxxxxx.log: cannot add inotify watch (limit of inotify watches was reached).

  其实这个错误直接访问提示网站告诉的挺详细的。

解决方案:

  • If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
  • If you are running ArchLinux, run the following command instead (see here for why):
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system

  

 

Listen error 错误和 limit of inotify watches was reached

标签:hub   nal   error:   sys   another   visit   news   amount   you   

原文地址:https://www.cnblogs.com/zhaojingyu/p/9297417.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!