[Dovecot] How do I increase the fd limit on OS X?

Jerry Yeager jerry at scene-naturally.dyndns.org
Thu May 8 19:08:49 EEST 2008


On May 8, 2008, at 1:04 AM, dovecot-request at dovecot.org wrote:

>
>
> Message: 6
> Date: Wed, 7 May 2008 13:17:44 -0700
> From: Rob Frohne <rob.frohne at wallawalla.edu>
> Subject: [Dovecot] How do I increase the fd limit on OS X?
> To: Dovecot Mailing List <dovecot at dovecot.org>
> Message-ID: <1210191465.19769.5.camel at frohro-d600.wwc.edu>
> Content-Type: text/plain
>
> Hi All,
>
> I just upgraded to the new 1.1rc5 from 1.0 that I had been using and  
> it
> advised me to increase the file descriptor limit.  I'm not sure how to
> do this.  There is a command built into tcsh that allows me to do this
> called limit, but sudo limit 4224 doesn't work, and usually dovecot is
> started from the rc.local file if I recall right, and I'm not sure how
> to set this up from there.  Any advice.
>
> Thanks,
>
> Rob
> -- 
> Rob Frohne <rob.frohne at wallawalla.edu>
> Walla Walla University
>
>
>



Try this

your_prompt_$  sudo sysctl -w kern.maxfiles=65536
your_prompt_$  sudo sysctl -w kern.maxfilesperproc=32768

You will be asked for your admin password. This will allow you to test  
things and see if it works better. The changes will revert to the  
system pre-defines when you re-boot or restart. IIRC, there is a  
master setting (unchangeable without recompiling OS X) that will not  
allow you to go over 65536, but I may be mistaken about that.

For a permanent change, add the following lines to the

/etc/sysctl.conf file:

or the

/etc/sysctl-macosxserver.conf file for Mac OS X Server

You may have to create the file, especially if you are the only user.  
(Make sure that only root has access to this file!!!!!!)


kern.maxfiles=65536             # System-wide limit
kern.maxfilesperproc=32768      # Per-process limit


This Is ONLY For OS X 10.3 or later.  For earlier versions you need to  
use /etc/rc which was so long ago that I do not recall all of the  
commands (sorry).

HTH,

Jerry


More information about the dovecot mailing list