[Dovecot] Dovecot lock problem

Simon Gao Simon.Gao at schrodinger.com
Fri Oct 16 20:46:03 EEST 2009


On Tue, 2009-10-13 at 11:37 -0700, Simon Gao wrote:
> We have a few users experiencing locking problem. When starting 
> Thunderbird, there is no new emails in Inbox. Dovecot createa a lock file 
> /var/spool/mail/<user>.lock. It never completes openning Inbox. If closing 
> the mail client, the open imap session does not get closed, nor the lock 
> file get deleted.

>What is the process doing? Check with "strace -p <imap process pid>"?
>How large is the user's mailbox?

The size of inbox varies. Some is large, some are only a few hundred KB. If 
the mailbox is large, it may take time to re-generate index and put lock on 
inbox file until it's done.  However, it should not for smaller mailbox file. 

Deleting index files did not help. The workaround is rename the mailbox file and 
copy it to ~/mail folder and let MTA re-create the mailbox. Then let mail 
client subscribes to the new temp mailbox. 

I will try strace next time.

> Here are the errors in log:
> 
> dovecot: Oct 13 11:18:35 Warning: IMAP(user1): Our dotlock file 
> /var/mail/user1.lock was deleted (kept it 88 secs)
> dovecot: Oct 13 11:18:35 Error: IMAP(user1): file_dotlock_delete() 
> failed with mbox file /var/mail/user1: No such file or directory

>I'd guess this is a huge mbox (or your disk I/O is very slow) and
>Dovecot takes a long time trying to read it. mbox_very_dirty_syncs=yes
>may be helpful.

It occurred to mailbox large and small. It should not take very long to read a 
few hundred KB file.




More information about the dovecot mailing list