Environment: OSX
Check max files: launchctl limit or launchctl limit maxfiles
To modify the values: echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf echo -e 'limit maxfiles 20480 unlimited\nlimit maxproc 1000 2000'| sudo tee -a /etc/launchd.conf echo 'ulimit -n 8192' | sudo tee -a /etc/profile
(or sudo ulimit -S -n xxxx
or sudo launchctl limit maxfiles xxxx xxxx (soft, hard limits))
You will need to restart for these changes to take effect.
You may no longer set limits to 'unlimited' under OS X
launchctl maxfiles are bounded by sysctl maxfiles, and therefore cannot exceed them
sysctl seems to inherit kern.maxfilesperproc from launchctl maxfiles
ulimit seems to inherit it's 'open files' value from launchctl by default
you can set a custom ulimit within /etc/profile, or ~/.profile ; while this isn't required
Be cautious when setting any of these values to a very high number when compared with their default - the features exist stability/security.
Environment: OSX
Check max files:
launchctl limit
orlaunchctl limit maxfiles
To modify the values:
echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf
echo -e 'limit maxfiles 20480 unlimited\nlimit maxproc 1000 2000'
| sudo tee -a /etc/launchd.conf
echo 'ulimit -n 8192' | sudo tee -a /etc/profile
(or
sudo ulimit -S -n xxxx
or
sudo launchctl limit maxfiles xxxx xxxx
(soft, hard limits))