I know sometimes you can get the "Too many open files" error by updating or installing big npm packages but right now it is happening to me anytime i try to do something with "-g"
npm -g ls
npm ls -g
npm update -g
even specifically
npm update -g grunt-cli
npm update -g [whatever package]
npm install -g [whatever package]
i'm on a Mac OS X 10.8 Mountain Lion
and my ulimit is already set to unlimited
any suggestion?
Where can we find error, ‘Too Many Open Files’? Since Linux has set a maximum open file limit by default, the system has a method for restricting the number of various resources a process can consume. Usually the ‘Too Many Open Files’ error is found on servers with an installed NGINX/httpd web server or a database server (MySQL/MariaDB/PostgreSQL).
If you’ve ever seen the “Too many files open” error message in a terminal window or found it in your system logs, it means that the upper limit has been hit, and the process is not being permitted to open any more files. There’s a system-wide limit to the number of open files that Linux can handle.
One of these is the number of files a process can have open at once. If you’ve ever seen the “Too many files open” error message in a terminal window or found it in your system logs, it means that the upper limit has been hit, and the process is not being permitted to open any more files.
The count of open files isn’t just the number of files you’ve opened. Almost everything in the operating system is using file handles. The system-wide maximum number of file handles can be seen with this command. This returns a preposterously large number of 9.2 quintillion. That’s the theoretical system maximum.
Assuming that you are using MacOSX, try to find out what is your limit by doing:
launchctl limit maxfiles
I have a clean install of OSX Maverick and I have:
maxfiles 256 unlimited
If your system does not show that, try to edit/create a /etc/launchd.conf
with something like:
limit maxfiles 256 unlimited
** Increase 256 to a higher number if that does not helps. Remember to reboot.
Check out this answer: https://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With