Increase default nofile ulimit
john.r.moser at gmail.com
Sun Jun 8 20:02:20 UTC 2014
The default nofile ulimit is 1024 soft, 4096 hard.
As you know, the soft limit is *the* limit. A hard limit specifies how
high a process may increase the ulimit; many processes don't attempt
this. Apache on CentOS 6, for example, will easily run over the 1024
soft limit after just 55 server side includes (not attempted on Ubuntu),
and does not attempt to raise the ulimit to the 4096 maximum. I have
had some issues with Web browsers running out of open files because of
sites with keepalive sockets (websockets), cache, plug-ins using local
storage in crazy ways, and so on.
Perhaps it is prudent to set limits in /etc/security/limits.conf by
default to a higher value, such as 32767 soft and 65535 hard for open
files. The original limits came about on 32-bit systems with less than
16GB of RAM and 4TB of hard drive space.
More information about the Ubuntu-devel-discuss