13

I've been using Ubuntu 11.10 for a little over a week now. But after some time I encountered this error(the one in the title) when Im trying to access the log in my RoR project. I found a fix which is by pasting this in the terminal:

sudo sysctl -w fs.inotify.max_user_watches=16384

The problem is I have to do this again and again everyday. Does anyone know how I can execute this at startup? Or does anyone know any permanent solution? thanks much!!!

Normz
  • 271
  • 1
  • 2
  • 9
  • 2
    I'd investigate what *else* is using so many watches that `tail` can't get one. – Wyzard Mar 30 '12 at 00:07
  • @ninjalj> sorry im a linux newb, how do i add the code there? just cpy and paste? – Normz Mar 30 '12 at 01:13
  • 2
    Seriously, the real problem isn't that the sysctl trick is temporary, it's that you need it in the first place. This shouldn't be happening. Something on your system is using a lot of inotify watches, which may be a sign of a resource leak somewhere. – Wyzard Mar 30 '12 at 03:51
  • A related question from the Unix/Linux QA: http://unix.stackexchange.com/q/13751 – kafuchau Mar 30 '12 at 04:42
  • @Wyzard: a resource leak? damn, this is a fresh install of ubuntu 11.10, thanks for the link... – Normz Mar 30 '12 at 05:30

2 Answers2

13

I started having this problem with tailing. I think it is because I am also running dropbox on this machine.

My fix is what dropbox suggests:

 echo 900000 | sudo tee /proc/sys/fs/inotify/max_user_watches
atroutt
  • 471
  • 6
  • 14
9

My issue was fixed. Thanks for everyone who helped!

I placed "fs.inotify.max_user_watches=16384" in /etc/sysctl.conf

Normz
  • 271
  • 1
  • 2
  • 9