scotch / angular-brunch-seed

AngularJS + Brunch
Other
228 stars 78 forks source link

Problem running under OS X Mountain Lion #64

Closed pkrnjevic closed 11 years ago

pkrnjevic commented 11 years ago

I kept getting "too many file" errors. Googling results in lots of inaccurate info. Finally, the simple solution is:

ulimit 1024

to increase the maximum number of file allowed per process.

This command does not persist across boots (may not even for other shell sessions). But be careful of more permanent solutions: several, including using launchctl (and /etc/launchctl.conf) no longer work under ML.

And kern.maxfilesperproc in sysctl may be overkill, especially since this problem seems to have gone away after I ran "bower update" to make angularjs current.

While ML's 256 maxfiles default seems low, I haven't found any case where changing it permanently was necessary (for a development notebook). The most common cause I run across is poorly designed node.js apps, that walk through folder hierarchies, opening everything at once. Fortunately, these are pretty easy to fix.

kylefinley commented 11 years ago

Sorry you ran into this, it's actually a common issue -- there's a note in the readme about it: https://github.com/scotch/angular-brunch-seed#common-issues The issue is inherited from brunch: https://github.com/brunch/brunch/blob/master/docs/faq.md#i-get-emfile-error-when-i-build-brunch-project-wtf

Fortunately, these are pretty easy to fix.

If you have the time, would you mind looking though brunch's code to see if things can be improved? I'm sure @paulmillr would gladly accept a pull request if you were able to resolve this.

paulmillr commented 11 years ago

I think this is a common problem of all watchers / builders. Grunt-based tools are the same.

But i’m open for suggestions.

pkrnjevic commented 11 years ago

And here's me telling my kids to read the manual . I'll try to have a look at Paul's code - if he doesn't mind some OSX specific code, fsevents (#include <CoreServices/CoreServices.h>) can monitor entire hierarchies with a single handle.

On 2013-04-10, at 8:16 PM, Kyle Finley wrote:

Sorry you ran into this, it's actually a common issue -- there's a note in the readme about it: https://github.com/scotch/angular-brunch-seed#common-issues The issue is inherited from brunch: https://github.com/brunch/brunch/blob/master/docs/faq.md#i-get-emfile-error-when-i-build-brunch-project-wtf

Fortunately, these are pretty easy to fix.

If you have the time, would you mind looking though brunch's code to see if things can be improved? I'm sure @paulmillr would gladly accept a pull request if you were able to resolve this.

— Reply to this email directly or view it on GitHub.

paulmillr commented 11 years ago

@pkrnjevic thanks! File watcher that brunch uses is chokidar.