I've been getting various "too many files open in system"-type errors on Yosemite (10.10.1). Searching around suggests setting kern.maxfiles
and kern.maxfilesperprocess
in /etc/sysctl.conf
.
I've tried this, and kern.maxfilesperprocess
sticks after a reboot, but kern.maxfiles
doesn't.
% cat /etc/sysctl.conf
# NB DO NOT COPY AND PASTE THIS INTO YOUR CONFIG FILE - IT DOESN'T WORK
kern.maxfiles=20480
kern.maxfilesperproc=18000
(reboot)
% sysctl kern.maxfiles
kern.maxfiles: 12288
% sysctl kern.maxfilesperproc
kern.maxfilesperproc: 18000
If I set it manually at the command line, it works, so it doesn't seem I'm exceeding any upper limit:
% sudo sysctl -w kern.maxfiles=20480
kern.maxfiles: 12288 -> 20480
% sysctl kern.maxfiles
kern.maxfiles: 20480
I have seen warnings about these values being overridden in /etc/launchd.conf
but I don't have this file:
% cat /etc/launchd.conf
cat: /etc/launchd.conf: No such file or directory
Spotlight search doesn't find any other mention of kern.maxfiles
, so I'm out of ideas. Any other suggestions?