Skip to content

Cannot watch large directories #4

@ericvicenti

Description

@ericvicenti

Directories with too many files result in this exception for me on OSX with node v0.8.8. In my case, "too many" files is 162 files clocking in at 22.7MB on disk. I'm not sure where the breaking threshold is, but I would hope we can watch directories of this size or greater.

var a = hound.watch('/Users/me/Projects/project')

Error: watch EMFILE
at errnoException (fs.js:806:11)
at FSWatcher.start (fs.js:837:11)
at Object.fs.watch (fs.js:861:11)
at Hound.watch (/XYZ/node_modules/hound/hound.js:45:27)
at Hound.watch (/XYZ/node_modules/hound/hound.js:42:12)
at Hound.watch (/XYZ/node_modules/hound/hound.js:42:12)
at Hound.watch (/XYZ/node_modules/hound/hound.js:42:12)
at Hound.watch (/XYZ/node_modules/hound/hound.js:42:12)
at Hound.watch (/XYZ/node_modules/hound/hound.js:42:12)
at Object.exports.watch (/XYZ/node_modules/hound/hound.js:13:11)

I have gotten around this in the short term by setting up multiple hound watchers for each sub directory within the project.

For comparison, and it might not be an applicable one because of hound's feature-set, nodemon successfully watches directories of this size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions