[Dovecot] Test environment question

Timo Sirainen tss at iki.fi
Sun Oct 5 13:58:17 EEST 2008


On Fri, 2008-10-03 at 14:33 -0400, Stewart Dean wrote:
> I am seeing posix_fallocate and file_set_size errmsgs in the mail syslog, but
> see a pattern:
> 
> 1) They only happen with the /var/spool/mail inbox NOT with any of the /home
> folders and appear to be happening every 10 minutes from the time I started DC
> (9AM, 10/1/98) until 11AM, 10/2...and then ceased
> The every ten minute message sets looked like this:
>   > Oct  1 22:30:31 egg mail:err|error dovecot: IMAP(sdean): posix_fallocate()
> failed: Resource temporarily unavailable

The main problem here is that posix_fallocate() is broken in your AIX
(v1.0 doesn't even try to use it). My previous patch attempted to make
Dovecot detect this and silently fallback to not using it, but
apparently it can fail in more ways. I thought about adding another
check for EAGAIN, but perhaps posix_fallocate() just returns the
previous errno so it can't be checked that way. So I moved the check to
configure instead:

http://hg.dovecot.org/dovecot-1.1/rev/12565ef10d1c

Alternatively you could just remove HAVE_POSIX_FALLOCATE from config.h
after running configure. Or yet another way would be to try to find out
if it's already been fixed in AIX. This looks related:
http://www-01.ibm.com/support/docview.wss?uid=isg1IY77112

> 3) However, then there was the following:
> a) If I used webmail, which accessed the production server and got the indices
> on my test server out of sync, I got this error message from in the mail syslog
> on my test server:
> > Oct  3 12:20:23 egg mail:err|error dovecot: IMAP(sdean): mbox sync: UID inserted
> >  in the middle of mailbox /var/spool/mail/sdean (648818 > 648046, seq=1153, idx_
> > msgs=1187)

v1.1 also has a bug that can cause this, although normally it should be
visible only when index files aren't being used, or they're out of sync
for some reason. This'll fix it:
http://hg.dovecot.org/dovecot-1.1/rev/a5bf7e12f3cc

> > Oct  3 12:44:58 egg mail:info dovecot: imap-login: Maximum number of connections
> >  from user+IP exceeded: user=<sdean>, method=PLAIN, rip=10.20.10.169, lip=192.24
> > 6.229.31
> Turns out I had 10+ sessions, one back from yesterday, so I killed them all and
> could get mail, but...about six minutes later, I had the two posix_fallocate and
> file_set_size errmsgs again after not having any for a day.  So something about
> new connections maybe causes this?
> 
> Any ideas why:
> a) I am having leftover IMAP sessions on my test server?  This doesn't happen on
>    my production DC V1.0 server

Are you sure? Perhaps you just didn't notice them since v1.0 didn't have
any limits to how many were allowed? I think it's more likely that the
client(s) really just left that many connections. So the choices are:

a) Increase mail_max_userip_connections setting.

b) Figure out where the sessions are from and see if you can do
something about them on the client side. In Thunderbird there's a
setting which specifies how many connections it can use.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20081005/9c27d557/attachment.bin 


More information about the dovecot mailing list