centos – root权限被拒绝更改inotify max_user_watches,如何解决这个问题?

作为CentOs 6.4服务器的root用户,我在应用程序中遇到了这个错误
Fri May 16 01:45:23 2014 Error: Terminating since out of inotify watches.
Consider increasing /proc/sys/fs/inotify/max_user_watches

但是当我尝试以root身份运行命令时,我被拒绝了.

# echo 100000 > /proc/sys/fs/inotify/max_user_watches
-bash: /proc/sys/fs/inotify/max_user_watches: Permission denied

即使我编辑/etc/sysctl.conf,我也会被拒绝:

# echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf
# sysctl -p
error: permission denied on key 'fs.inotify.max_user_watches

我怎么解决这个问题?

我找到了答案.

此服务器是VPS,它在OpenVZ容器中运行,我不允许修改该容器的任何内核参数.

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native