The default file descriptor limit (ulimit -n 1024) is too low

Steve Langasek steve.langasek at
Fri Nov 5 20:46:23 GMT 2010

On Fri, Nov 05, 2010 at 09:50:26AM -0700, Kees Cook wrote:
> On Fri, Nov 05, 2010 at 03:49:42AM -0700, Scott Ritchie wrote:
> > Upon investigation, it seems that there is support for a "soft"
> > (default) and a "hard" (apps-can-increase-themselves) limit.  Would it
> > be ok if we raised the hard limit?

> I'm not hugely opposed to that; I am worried that people will just
> arbitrarily raise the limit on applications that can't handle it, though,
> but that at least requires some work. Does anyone seen a downside to
> raising the soft limit?

I see no downside to raising the hard limit.

> As for how to do it, the limit comes from the kernel initially and is
> modified by Upstart and PAM, depending on configurations. I'm not 100% sure
> the best approach to take.

Should be fixed in the kernel.

We should also fix it so pam_limits is able to grab the kernel default
limits from somewhere, instead of hard-coding these at compile time.  I
think you suggested reading /proc/1/limits for this, though it's less than
ideal to be parsing this file to get that info.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                          
slangasek at                                     vorlon at

More information about the ubuntu-devel mailing list