6

As root in a CentOs 6.4 server I got this error in an application:

Fri May 16 01:45:23 2014 Error: Terminating since out of inotify watches.
Consider increasing /proc/sys/fs/inotify/max_user_watches

But when I try to run the command as root I got permission denied.

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

Even if I edit the /etc/sysctl.conf I get permission denied:

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

How can I solve this?

Samuel G. P.
  • 399
  • 2
  • 3
  • 10

3 Answers3

8

I found the answer.

This server is a VPS and it is running in a OpenVZ container and I'm not allowed to modify any kernel parameter of that container.

Samuel G. P.
  • 399
  • 2
  • 3
  • 10
0

Give this a try, you can have the issue even running as root, is not related to wich user you use.

sudo /sbin/sysctl -p
0

instead you can try command like below:

sudo sysctl -w fs.aio-max-nr=1231231