错误“达到了对手表​​进行配音的用户限制". ExtReact版本 [英] Error "User limit of inotify watches reached". ExtReact build

查看:91
本文介绍了错误“达到了对手表​​进行配音的用户限制". ExtReact版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了ExtReact,并附带示例.当我跑步

I installed ExtReact, with examples. When I run

npm start

我收到一个错误:

ERROR in [@extjs/reactor-webpack-plugin]: Error:
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: User limit of inotify watches 
reached
[ERR]
[ERR] Total time: 13 seconds

[ERR] /home/user/project/build/ext-react/build.xml:101: 
com.sencha.exceptions.BasicException: User limit of inotify watches reached
[ERR] A log is available in the file "/home/user/project/build/ext-
react/sencha-error-20171027.log"

如何解决此错误?

推荐答案

为什么?

用于同步文件(例如dropbox,git等)的程序使用inotify来注意文件系统的更改.该限制可以通过-

Programs that sync files such as dropbox, git etc use inotify to notice changes to the file system. The limit can be see by -

cat /proc/sys/fs/inotify/max_user_watches

对我来说,它显示 100000 .如果此限制不足以监视目录中的所有文件,则会引发此错误.

For me, it shows 100000. When this limit is not enough to monitor all files inside a directory it throws this error.

增加inotify观察者的数量(简短版):

如果您正在运行 Debian,RedHat或其他类似的Linux发行版,请在终端中运行以下命令:

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

如果您正在运行 ArchLinux ,请改为运行以下命令(有关原因,请参见此处):

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

然后将其粘贴到您的终端中,然后按Enter键运行它.

Then paste it in your terminal and press on enter to run it.

技术细节:

在Linux上,默认情况下,Listen使用inotify监视目录中的更改.遇到可以监视的文件数量受到系统限制的情况并不少见.例如,Ubuntu Lucid(64位)的inotify限制设置为8192.

Listen uses inotify by default on Linux to monitor directories for changes. It's not uncommon to encounter a system limit on the number of files you can monitor. For example, Ubuntu Lucid's (64bit) inotify limit is set to 8192.

您可以通过执行以下操作来获取当前的inotify文件监视限制:

You can get your current inotify file watch limit by executing:

$ cat /proc/sys/fs/inotify/max_user_watches

如果此限制不足以监视目录中的所有文件,则必须增加该限制,以使侦听"正常工作.

When this limit is not enough to monitor all files inside a directory, the limit must be increased for Listen to work properly.

您可以使用以下方法临时设置新的限制:

You can set a new limit temporary with:

$ sudo sysctl fs.inotify.max_user_watches=524288
$ sudo sysctl -p

如果您想使自己的限额成为永久限额,请使用:

If you like to make your limit permanent, use:

$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p

如果Listen不断抱怨,您可能还需要注意max_queued_events和max_user_instances的值.

You may also need to pay attention to the values of max_queued_events and max_user_instances if Listen keeps on complaining.

来源: https://github.com/守卫/听/维基/增加观看人数

这篇关于错误“达到了对手表​​进行配音的用户限制". ExtReact版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆