Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect running out of file descriptors better #9

Open
jmhodges opened this issue Sep 5, 2015 · 6 comments
Open

detect running out of file descriptors better #9

jmhodges opened this issue Sep 5, 2015 · 6 comments

Comments

@jmhodges
Copy link
Owner

jmhodges commented Sep 5, 2015

OS X still has very low limits and we run into this occasionally.

@kevinburke
Copy link
Contributor

Any ideas when specifically would I hit this? I'm trying to watch maybe ~50 files and changes aren't being picked up. If I lower the number they are again.

@jmhodges
Copy link
Owner Author

Set your file descriptor limit higher. OS X ships with a very low one. (It's more complicated to fix than just using ulimit -n in .bash_profile. You'll have to google for the current OS's version.)

@jmhodges
Copy link
Owner Author

It's literally just because OS X ships with a file descriptor limit of 256 by default and you can hit that trivially in a shell that's watching dozens of files.

@kevinburke
Copy link
Contributor

Yikes, okay, will give it a shot.

@jmhodges
Copy link
Owner Author

jmhodges commented May 5, 2017

This would track the error coming out of fsWatcher and when the file descriptor error is returned, and mention to the user that they need to raise their file descriptor limit.

Honestly, I'm not sure if that's a good idea. I'll leave this up for a little while longer and maybe someone will send a patch, but I think we can't fix everyone. It's mostly just us MacOS users who have to deal with this dumb low file descriptor limit.

@jmhodges
Copy link
Owner Author

jmhodges commented May 5, 2017

Yeah, I think it might just be better for folks to see this ticket and go "oh, I have to figure out the way my OS has to up my file descriptor limit" and us macos users get to learn what really dumb OS-version-specific way we have to do it now.

This stackoverflow answer for the macos users seems like it's being updated as Apple changes how they do things. https://superuser.com/a/1171023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants