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.
On Fri, 2009-10-16 at 10:46 -0700, Simon Gao wrote:
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.
Are you using pop3? Do you have pop3_lock_session=yes? Other than that I can't think of anything that could keep the lock file for a long time. So strace would be helpful.
On Friday 16 October 2009 11:04:33 Timo Sirainen wrote:
On Fri, 2009-10-16 at 10:46 -0700, Simon Gao wrote:
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.
Are you using pop3? Do you have pop3_lock_session=yes? Other than that I can't think of anything that could keep the lock file for a long time. So strace would be helpful.
No. All affected users use imap. This occurred after hard reboot of the imap server.
participants (2)
-
Simon Gao
-
Timo Sirainen