go-watcher icon indicating copy to clipboard operation
go-watcher copied to clipboard

Could not watch folder: too many open files

Open yianni-ververis opened this issue 5 years ago • 5 comments

I get this error

Could not watch folder: too many open files

yianni-ververis avatar Jun 01 '19 20:06 yianni-ververis

can you add -ignore flag?

yianni-ververis avatar Jun 03 '19 12:06 yianni-ververis

I had this same issue, tracked it down to the fact that I had a node_modules folder in the folder I was watching.

With node_modules: Screenshot 2019-06-07 at 11 18 02

Without node_modules Screenshot 2019-06-07 at 11 17 35

I think adding an option to ignore folders would be great or maybe even read off of .gitignore ?

divanvisagie avatar Jun 07 '19 09:06 divanvisagie

exactly!! I have to remove the node_modules, watcher and then npm install & npm audit fix again

yianni-ververis avatar Jun 07 '19 10:06 yianni-ververis

Suggested fix here #41

TobyWilkes avatar Aug 07 '19 15:08 TobyWilkes

I have the same issue, blaming in on the vendor directory.

$ find vendor/ -type f | wc -l
    2423

Which does not even seem like that many files

$ ulimit
unlimited

I am not sure .gitignore solution will work since git ignored files may have an impact on how the application is run. I would suggest instead to have .watchignore file or something, that would contain glob patterns for those folder/files that do not need to be watched

Edit Checked the source code, vendor directory is excluded anyways. I do not know then what this is related to, I have 7 watchers running at the same time but the number of files is no way close to the limit; besides it works for others on the same repositories

vonhraban avatar Sep 18 '19 12:09 vonhraban