MAC apachectl ulimit error with 10.6.5

18 November 2010 13:23

If you’ve upgraded to the latest MAC release of Snow Leopard, 10.6.5, and you use apache you may have noticed a bug when you try to control apache with apachectl.

[ian@ian ~]$ sudo apachectl -t
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument

The release notes detail that apache has been upgraded to 2.2.15 to fix some security holes, however by doing so causes this bug.

The fix is pretty easy and requires you to edit the /usr/sbin/apachectl file. The line you’re looking for is this:

ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"

All you need to do is simply remove the actual ulimit command and leave this in place:

ULIMIT_MAX_FILES=""

Try apachectl again and it’ll work. In my case the offending line was in fact 64, not 82.

Filed: Technology // Tagged: , ,

You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a comment or leave a trackback from your own site.

 
What's ianteresting?   •   Twitter   •   About   •   Contact
©2014 Ian Winter. All Rights Reserved.   •   Powered by WordPress   •   Hosted at Memset