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

Too many open files (on Mac) #139

Open
jimafisk opened this issue Feb 8, 2021 · 4 comments
Open

Too many open files (on Mac) #139

jimafisk opened this issue Feb 8, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@jimafisk
Copy link
Member

jimafisk commented Feb 8, 2021

@claxxmoldii reported a Mac specific error in the comments on our youtube:

watcher.go.51: Error watching 'assets/' folder for changes: too many open files

This happened when adding themify icons to the assets folder, removing themify fixes the issue.

We use fsnotify under the hood to watch the filesystem for changes. Hugo uses the same project and their users sometimes report a similar issue:

@jimafisk jimafisk added the bug Something isn't working label Feb 8, 2021
@padraicbc
Copy link
Contributor

@jimafisk is this an OS issue more than a Plenti/fsnotify bug? increasing kern.maxfiles and kern.maxfilesperproc as discussed here and in the docs should rectify the issue or am I missing something?

@jimafisk
Copy link
Member Author

I think you're right @padraicbc. It seems like Hugo may have implemented a fix in their project to achieve a similar result: gohugoio/hugo@ff54b6b

I haven't been able to reproduce this issue on my Ubuntu 20.04 laptop, but @claxxmoldii reported still experiencing this problem yesterday in the comments of a Plenti video. Jon I know you mentioned trying to increase your OS soft and hard limits, were you running something similar to the following commands to do that?

sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536 65536

@claxxmoldii
Copy link

hey there... the solution i tried was this...

sudo launchctl limit maxfiles 64000 524288

still throwing the error... then increased it to...

sudo launchctl limit maxfiles 1000000 1000000

still throwing an error... i'm running osx mojave...

@padraicbc
Copy link
Contributor

hey there... the solution i tried was this...

sudo launchctl limit maxfiles 64000 524288

still throwing the error... then increased it to...

sudo launchctl limit maxfiles 1000000 1000000

still throwing an error... i'm running osx mojave...

Hi @claxxmoldii. You'll need to add the plist files mentioned here https://wilsonmar.github.io/maximum-limits/#sierra-and-newer-versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants