[Dovecot] Timeout while waiting for lock for transaction log file

Timo Sirainen tss at iki.fi
Sun Sep 9 04:27:54 EEST 2007


On Wed, 2007-09-05 at 15:24 +0200, Peter Eriksson wrote:
> I have a user that gets client timeout errors when he tries to
> delete/clean up his massive "Spam" folder (many thousands of mail messages).
> 
> He uses Thunderbird and has it configured to use "Move to Trash" when
> he deletes messages.
> 
> I find the following in Dovecot's log file when it happens:
> 
> Aug 28 10:38:22 ifm.liu.se dovecot: [ID 107833 mail.error] IMAP(bpn):
> Timeout while waiting for lock for transaction log file
> /home/bpn/Maildir/.Trash/dovecot.index.log

This happens if mailbox synchronization has been running for 2 minutes
by one process and another process is also trying to sync the mailbox.
Synchronization is also done when committing copied/saved mails, like:

 - lock log file
 - rename() all new files to destination mailbox's new/ or cur/
 - unlock

I guess the rename() stage takes a long time with that user. I hadn't
really thought before that this could be a problem.

> Any suggestions on what I can tuned/fix in Dovecot to solve this issue?

You could grow the hardcoded timeouts.

If you're using dotlocks, src/lib-index/mail-transaction-log.c:

#define LOG_DOTLOCK_TIMEOUT 60
#define LOG_DOTLOCK_STALE_TIMEOUT 60

Otherwise src/lib-index/mail-index-private.h:

#define MAIL_INDEX_LOCK_SECS 120

It's a bit stupid that these are using different defines with different
values. I'll go fix that for v1.1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070909/757e5e40/attachment.bin 


More information about the dovecot mailing list