One morning I found my server showing the infamous gray box saying more or less “there has been a system error, you have to restart the machine”. I restarted, but poor Apache did not want to get up.
Looking at the logs, I found the error “ulimit: open files: cannot modify limit: Invalid argument”. A quick search on the Internet, and luckily I fount the lifesaver: deversus blog. It reported a similar error due to an upgrade to Mac OS 1.6.5. That is not my case: I’m running 1.6.8 and there was no recent OS upgrade… (Yes, I’m stuck to 1.6 because Apple doesn’t support upgrading my Dual Core, 2,66 GHz Mac Pro 1.1 to newer OS versions… many thanks!). However, although I still do not understand what caused the failure, the cure worked. By changing
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
and rebooting, the problem was solved. Thanks deversus!