Re: [Dovecot] Dovecot / OS X 10.4 Mail.app and "Too Many Opened files" error message ?
(replying to myself)
After a long time, the OS X client say error : "Too Many opened
files".
Seems that OS X has stupidly low number of files that can be opened...
$ ulimit -a [...] open files (-n) 256
On my MacBook Pro....
This is bloody low....
So I've figured to change this limit globaly, but it seems that OS X
don't have any limits.conf or default values....
This kinda strange..
So I decided to do some local fixe for Mail.app only :
in /Applications/Mail.app/Contents/MacOS/ $ sudo mv Mail Mail.orig and ... Create a Mail file with this following content : #!/bin/sh
# thanks to http://www.amug.org/~glguerin/howto/More-open-files.html
# To understand this, read 'man sh' below "substring processing". # This can also be accomplished with the 'dirname' command, # but it may not be installed. here="${0%/*}"
# This should be the name of your native Java-app's executable. cmd='Mail.orig'
# Set all desired soft-limits here. See 'ulimit' in 'man sh'. ulimit -S -n 1000
# Execute the Java-app in the current process. See 'exec' in 'man sh'. exec "$here/$cmd" "$@"
$ sudo chmod +x Mail
and this all...
FYI Mail.app is really strange thing....
$ lsof | grep Mail.orig | wc -l 150
Mostly all libraries and TCP connection to mail server...
Maybe this can be added to Wiki even if it is not too mutch dovecot
related, but can be usefull for people like me that does have lots of
mail....
/Xavier
On Sep 14, 2007, at 20:48, Xavier Beaudouin wrote:
(replying to myself)
After a long time, the OS X client say error : "Too Many opened
files".Seems that OS X has stupidly low number of files that can be opened...
$ ulimit -a [...] open files (-n) 256
On my MacBook Pro....
This is bloody low....
So I've figured to change this limit globaly, but it seems that OS
X don't have any limits.conf or default values....
Use launchctl for this under 10.4. Edit /etc/launchd.conf or create
it if it does not exist and enter
limit maxfiles 512 1024
The first number is the soft limit the second one the hard limit.
Reboot the computer and the limits are changed systemwide
participants (2)
-
Michael Guntsche
-
Xavier Beaudouin