Shandrew (shandrew) wrote,
Shandrew
shandrew

Dear mac lazyweb

How do i increase the default open files limit (ulimit -n / limit descriptors) in OS X?

This problem has been bugging me for a couple years. The default limit of 256 files per process is quite small and i've bumped up against the limit in several programs, most frequently with firefox w/many tabs, which i think has some bug where files fail to get closed. The problem gets worse if you run a tab firefox extension like tabmixplus. The result is an ugly mess of failures, where css/images/html randomly fail to load, dialog boxes are full of fail, and you have no choice but to restart firefox.

I know how to work around it; i can change the limit on the command line and launch firefox from there, or i can modify the shell script that executes firefox, or i can make my own wrapper script, but none of those is particularly elegant or even close to the macintosh way.

kern.maxfiles and kern.maxfilesperproc are not the way to go; those are already set to 12288 and 10240. I've even tried grepping for 256 in /etc with no luck.

As a last resort i suppose i can try downloading the darwin source and learning how the OS X boot process works, but really, all i want to change is a little shell variable.

(maybe i miss freebsd?)
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments