2

I'm running a mail server for about 200 users with courier-imap on Debian 7. This server is running a linux kernel 2.6.38 inside a Xen guest having 2 cpu cores and 2 GB RAM. The server accept incoming mail through postfix, but resources intensive checks (amavis, spamassassin) are delegated to another server.

Lately I'm running into IMAP performance issues with client connections being dropped randomly. The load on the server is not low, but it is also not that high, even at times when those connection drops are happening. At peak times, I have about 120 simultaneous imap clients and 5 min load is < 1.

I've noticed the connection drops appear at the same time as the following log lines on my server:

imapd: FAMPending: timeout

I guess that when FAM is timing out, the imap server returns some kind of error and, depending on the client, the error is dealt with gracefully or not (some webmail clients do not like that).

The regular Debian courier-imap package requires a fam implementation, I have the choice of using famd or gamin. I've tried both and both are running into those timeouts. It seems to me gamin produces a lower load on the server, but still timeouts are occurring.

I'm wondering if there is anything I can tune to improve the fam/gamin performance and to avoid the timeout messages. There is not much to configure in the daemons. However, could it be that I'm running out of file descriptors or inotify resources? How could I check that?

Or do you think a better choice would be to upgrade my Xen guest or to move away from courier-imap?

Læti
  • 2,075
  • 21
  • 33
  • Tonin, did you ever figure out the answer to this? We're running into a similar error. CentOS 6, VMware ESXi, Courier IMAP. No obvious load issues. – Stefan Lasiewski May 15 '15 at 22:38
  • 1
    @StefanLasiewski Not exactly. But it seems things are a bit better increasing the number of `authdaemond` processes. I have it at 30 now, with peaks of IMAP connexions around 200. The FAMPending log lines are still seen, but a few times a day as opposed to hundreds before. I'm considering switching to Dovecot. – Læti May 18 '15 at 10:23
  • Okay. Our experimentation shows that we can reduce the number of errors by disabling IMAP_ENHANCEDIDLE, possibly disabling TLS_CACHEFILE & TLS_CACHESIZE (This is suggested in the config file). This issue also seems to be resource related, so we're looking at more general resource tweaks. – Stefan Lasiewski May 18 '15 at 18:45

0 Answers0