Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setting launchctl limit maxfiles 512 unlimited results in error: Neither the hard nor soft limit for "maxfiles" can be unlimited

Tags:

macos

osx-lion

Screen shot of my Terminal http://d.pr/1pE5

I'm following this tutorial:

http://blog.ghostinthemachines.com/2010/01/19/mac-os-x-fork-resource-temporarily-unavailable/

And where it tells me to follow the process I follow in my screenshot:

[laptop:~ user]$ launchctl limit maxproc 512 1024

[laptop:~ user]$ launchctl limit maxfiles 512 unlimited

[laptop:~ user]$ launchctl limit

I'm trying to perform the following setup:

launchctl limit maxfiles 512 unlimited

My system (Lion) tells me what I'm doing is wrong, and silly, but It's already set unlimited... so I don't know what's going on, or why it's behaving this way.

Should I just go ahead and give it a specific value?

like image 804
Victor S Avatar asked Nov 14 '22 18:11

Victor S


1 Answers

This comment says that unlimited is not valid for maxfiles on 10.6.

Since that does not apply to 10.7 (Lion) I don't actually know what the answer is.

edit: answer only works for 10.6. Removed bad suggestion to set both soft and hard limits to 512.

like image 113
myeeshen Avatar answered Dec 26 '22 13:12

myeeshen