[Dovecot] ulimit -n in start-script
Hi!
Even on midrange-systems it's necessary to set "ulimit -n" to a higher value then the system default of 1024.
I'd prefer having this already prepared:
In /etc/defaults/dovecot we should add:
# Set amount of "open files" / ulimit -n ULIMIT_OPEN_FILES=16884
In /etc/init.d/dovecot we should add:
# Set amount of open files / ulimit -n [ -n "$ULIMIT_OPEN_FILES" ] && ulimit -n $ULIMIT_OPEN_FILES
Peer
-- Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin
http://www.heinlein-support.de
Tel: 030 / 405051-42 Fax: 030 / 405051-19
Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin
Peer Heinlein schrieb:
Even on midrange-systems it's necessary to set "ulimit -n" to a higher value then the system default of 1024.
Could this lead to this problem?
Error: file_dotlock_create(/var/mail/example.com/john.doe/Maildir/.Sent/dovecot-uidlist) failed: No space left on device
Patrick
At 1PM +0100 on 20/03/13 you (Patrick Westenberg) wrote:
Peer Heinlein schrieb:
Even on midrange-systems it's necessary to set "ulimit -n" to a higher value then the system default of 1024.
Could this lead to this problem?
Error: file_dotlock_create(/var/mail/example.com/john.doe/Maildir/.Sent/dovecot-uidlist) failed: No space left on device
Not on most systems. Reaching a ulimit -n limit usually causes open(2) to fail with EMFILE (Too many open files) rather than ENOSPC (No space left on device). ENOSPC is only supposed to be returned if the filesystem has either run out of space altogether, or has run out of inodes. (Incidentally, going over quota on a filesystem also has its own errno, EDQUOT (Quota exceeded).)
However, check your system documentation, because some systems do strange things.
Ben
participants (3)
-
Ben Morrow
-
Patrick Westenberg
-
Peer Heinlein