Bug #3772

consider raising default descriptor soft limit

Added by Rich Lowe almost 8 years ago. Updated about 4 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


We by default have the rlimit file descriptor soft limit set to 256 (or at least, that's what it is on my systems). This seems to be, probably, how OSX defaults also. Linux seems to default to 1024.

I have a handful of times recently been screwed by software that hits this limit ungracefully, most notably git. More graceful software is most gracefuly by increasing the soft limit to match the hard, expecting Solaris-like systems to have low limits. There are several things in pkgsrc with accompanying patches to either increase the soft limit, or to make soft == hard

Perhaps it is time we considered, (and I do mean that, not do it blindly) upping the default.


Updated by Rich Lowe almost 8 years ago

SmartOS patches the limit (via the default /etc/system) such that soft == hard by default, at 65536


Updated by Joshua M. Clulow almost 8 years ago

Experimentally, on Mac OS X 10.8, I can set the soft limit as high as 10240 (0x2800) as a regular user or 12288 (0x3000) as root.

The default soft limit appears to be 2560. The default hard limit is "unlimited", though there is clearly a specific upper bound that is different for root and non-root users.


Updated by Rich Lowe over 7 years ago

  • Status changed from New to In Progress

Updated by Rich Lowe over 7 years ago

This stalled because of complicates related to select(), range-checking of fd_set, and differences in implementation.

I have a plan to happily deal with this, and am back on it.


Updated by Electric Monk about 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 2209d3c850d80c0681948f966816f28f767575cb

commit  2209d3c850d80c0681948f966816f28f767575cb
Author: Richard Lowe <>
Date:   2017-01-25T17:40:33.000Z

    3772 consider raising default descriptor soft limit
    Reviewed by: Igor Kozhukhov <>
    Reviewed by: Robert Mustacchi <>
    Reviewed by: Juraj Lutter <>
    Reviewed by: Patrick Mooney <>
    Approved by: Dan McDonald <>

Also available in: Atom PDF