Hi all,
When we install mac OS from lab image, max number of open files for process getrlimit hard limit is unlimited and soft limit is 256 (snowleopard and lion).
Given a MAC machine where hard limit for max number of open files is not unlimited(for example using the command below or due to some unidentified launch daemon/agent/config), is there a way we can reset it back to unlimited?
sudo launchctl limit maxfiles 10000
//changes the hard and soft limit for maxfiles to 10000 instead of unlimited
sudo launchctl limit maxfiles unlimited : This Does not work as Mac OS expects that argument for maxfiles must be numeric and not “unlimited” although unlimited works for other resources like core
Documentation for setrlimit
A good discussion at:
http://lists.apple.com/archives/unix-porting/2010/Sep/msg00001.html
sysctl and ulimit commands do not help.
How can users control this setting at time of installation and after installation to change it to unlimited? (given superuser permission)
Are these limitations related to bugs in kernel?
Thanks
Gaurav