Mac OS X - too many open files....
- Language:
This is really annoying. Why something has to be simple if it can be complicated? For some reason on Mac OS X commands: 'ulimit' and 'sysctl' works fine but are actually useless. Don't count on them if you want to change maximum number of open files in your system. Fortunately this forum threads comes to help. To save you from reading through all of this here is how it goes: To check limits on your system run: 'launchctl limit'. To change max number of open files run: 'launchctl limit maxfiles 400000 unlimited'. To change the setting permanently add to the file: '/etc/launchd.conf' following line: limit maxfiles 400000 unlimited This doesn't however work for maxproc setting and please don't ask my why. I am asking...
This is really annoying. Why something has to be simple if it can be complicated?
For some reason on Mac OS X commands: 'ulimit' and 'sysctl' works fine but are actually useless. Don't count on them if you want to change maximum number of open files in your system. Fortunately this forum threads comes to help. To save you from reading through all of this here is how it goes:
To check limits on your system run: 'launchctl limit'. To change max number of open files run: 'launchctl limit maxfiles 400000 unlimited'. To change the setting permanently add to the file: '/etc/launchd.conf' following line:
limit maxfiles 400000 unlimited
This doesn't however work for maxproc setting and please don't ask my why. I am asking...
- artur's blog
- Add new comment
- 228299 reads
Comments
Info from year 2013 :) MacOS:
Info from year 2013 :)
MacOS: 10.8.3
For me it worked but only when I set both soft and hardlimit to the same value. And of course changes are visible after restart.
So my /etc/launchd.conf has line like below:
limit maxfiles 100000 100000
with empty line at the bottom.
Launchctl only applies to
Launchctl only applies to launch daemon. You need sysctl. =o
On 10.6 at any rate, I think
On 10.6 at any rate, I think you can't use unlimited and in fact it won't work unless you have the hard and soft limits the same. So you might as well leave off the fourth param (hard limit):
limit maxfiles 400000
The configuration below
Doesn't work for me (Mac OS
Doesn't work for me (Mac OS 10.6.3). Set maxfiles in /etc/launchd.conf to 1024, but ulimit still reports 256 after reboot. Any idea why?