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

ENFILE Error #1

Closed
fkraeutli opened this issue Oct 18, 2018 · 2 comments
Closed

ENFILE Error #1

fkraeutli opened this issue Oct 18, 2018 · 2 comments

Comments

@fkraeutli
Copy link

When running spritesheets.js on a current version of MacOS one may encounter the following error:

Error: ENFILE: file table overflow

This is because MacOS only allows a limited number of open files. To increase the limit, run:

$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles=65536
$ sudo sysctl -w kern.maxfilesperproc=65536
$ ulimit -n 65536 65536    

Source: http://blog.mact.me/2014/10/22/yosemite-upgrade-changes-open-file-limit

@cpietsch
Copy link
Owner

Thank you for this fix! I am still running an old OSX version and didn't encounter this.
I must admit, that the pixi-packer used in spritesheet.js does sometime crash even on my system. Running the spritesheet.js script individually a second time often fixes it.

@cpietsch cpietsch pinned this issue Dec 20, 2018
@cpietsch
Copy link
Owner

The same goes for ubuntu:

# available limit
user@ubuntu:~$ ulimit -n
1024

# To increase the available limit to say 65535
user@ubuntu:~$ sudo vim /etc/sysctl.conf

# add the following line to it
fs.file-max = 65535

# run this to refresh with new config
user@ubuntu:~$ sudo sysctl -p

Source: https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a

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