I had a devastating experience this morning. On an unrelated issue, I have been hitting up against a max files limit on one of my servers. I noticed that setting ulimit -n unlimited only set it to 12288. I also noticed that in sysctl, the kern.maxfiles value was set to 12288. So, I decided to be smart and try:
So, whatever you do, don't set kern.maxfiles=unlimited!
sysctl -w kern.maxfiles=unlimited
I got this as response:
kern.maxfiles 12288 -> 0
So, thinking zero means unlimited (because that is the way it is with some applications!), I ran:
ulimit -n unlimited
Unfortunately, this promptly set my open files limit to zero! Immediately, apps stopped running. I continued to have a session, but I couldn't do anything at all. I couldn't set sysctl back; I couldn't reboot; I couldn't do anything. And since the server is 3,000 miles away from me in Phoenix, I had to call and pay for it to be rebooted by hitting the reset button. (Yes, I know, we need a remote reboot switch.)
So, whatever you do, don't set kern.maxfiles=unlimited!
•
[9,334 views]

