I just upgraded to 10.6.5 and noticed that apachectl stops working properly. When I run apacheclt now it gives me this error:
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
The problem seems to be with the ULIMIT variable in the shell script:
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
I think the problem is that ulimit returns “unlimited” which cannot be used in the command ulimit -S -n, so I just changed the ULIMIT back to what it was before upgrading to 10.6.5:
ULIMIT_MAX_FILES=""
Thanks a lot man. I’m glad you decided to blog about this issue as fast as you did.
I ve just upgrade to Snow Leopard 10.6.5 and apachectl did the same !
So I ve applied your solution and everything is ok, thank’s.
But why this line was changed in the upgrade ?
Pingback: Tweets that mention Snow Leopard 10.6.5 and apachectl | Notfornoone -- Topsy.com
Nice catch. This must be embarrassing for someone…
Thank you so much for finding and fixing this. Works great. Are you going to report it to Apple?
http://developer.apple.com/bugreporter/
If you’re not an ADC member let me know.
Thanks a lot.
I have been working through getting my system working as well. Thank you for the tip and correction, it worked like a charm.
Thank you!