SuSE eMail Server: "Too many open files in system"

Support knowledgebase (jreuter_imap_filemax)
Applies to

SuSE eMail Server II, SuSE eMail Server III

Symptom

Some services of the SuSE eMail Server are temporarily or completely not available, with messages in /var/log/messages about 'too many open files in system'. Mostly imapd is affected.

Cause

For every single connection to one of the services (IMAP, SMTP, LDAP) the respective dæmon opens several files and sockets. These open files then get referenced by file descriptors. The number of descriptors is limited by the kernel and normally allows up to 8192 open files and sockets in the system.

This value can be too small for a system with many users accessing the services simultaniously, however.

Solution

Increase the number of file descriptors available through the /proc file system, in the following example to 65536:

echo "65536"  >/proc/sys/fs/file-max

The kernel used for SuSE eMail Server II has another important parameter which affects the maximum number of open files. The maximum number of cached inodes, which should also be increased:

echo "131072" >/proc/sys/fs/inode-max

(This parameter does not exist anymore for Linux kernel 2.4 used by SuSE eMail Server III)

Both values should be as high as needed but as low as possible, yet with a little room left for times of high activity. Values too high waste too much memory while with values too low you will experience the problems again after a while, though less often. Furthermore the value inode-max should be larger than file-max.

To keep the adjustments over reboots you can add above commands to the start script /etc/init.d/boot.local (SuSE Linux eMail Server II: /sbin/init.d/boot.local)

Please note that we cannot offer support or any kind of liability for the consequences of using this hint.


Keywords: IMAP, EMAIL, EMAIL-SERVER, IMAPD, CYRUS, DLOPEN

Categories: SuSE Linux IMAP Server

SDB-jreuter_imap_filemax, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 19. Dez 2001
SuSE Linux AG - Last generated: 07. Jan 2002 by jreuter (sdb_gen 1.40.0)