go-watcher
go-watcher copied to clipboard
Could not watch folder: too many open files
I get this error
Could not watch folder: too many open files
can you add -ignore flag?
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
:
Without node_modules
I think adding an option to ignore folders would be great or maybe even read off of .gitignore ?
exactly!! I have to remove the node_modules, watcher and then npm install & npm audit fix again
Suggested fix here #41
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