[Dovecot] Locking problems on Dovecot 1.x in Maildir
Hi list,
Overall, everything works fine, and all the emails are delivered without anything messing up. But then, from time to time, the transaction logs for some users become corrupted, meaning emails cannot be read at all from dovecot.
With a bit of a search on google, it seems to be a problem with locking on the transaction log. The individual files are fine - it's maildir, so the chances of 2 accesses on the same file are near impossible. But the problem seems to come when things get a bit busy, and inevitably, the transaction log tends to get corrupted all too often now for me to just go in and delete the log, and start afresh.
I've addressed the issue temporarily by putting the index in memory by the :INDEX=MEMORY as opposed to a static file. This isn't ideal, but it seems to save the system going up in arms.
Is there an alternative to using this system?
Ronald.
-- Ronald MacDonald http://www.rmacd.com/ 0777 235 1655
On Mon, 2007-06-18 at 14:13 +0100, Ronald MacDonald wrote:
Hi list,
Overall, everything works fine, and all the emails are delivered without anything messing up. But then, from time to time, the transaction logs for some users become corrupted, meaning emails cannot be read at all from dovecot.
Actual error messages from logs would be useful. There are many reasons why Dovecot might say they're "corrupted".
Yes, my mistake. Of course, I should have also posted my dovecot -n
# /etc/dovecot/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot/dovecot.log info_log_path: /var/log/dovecot/additional.log log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap pop3 imaps pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login first_valid_uid: 1000 mail_extra_groups: mail mail_location: maildir:/home/vmail/%d/%1n/%n:INBOX=/home/vmail/%d/%1n/%n:JUNK=/home/vmail/%d/%1n/%n:INDEX=MEMORY mail_debug: yes mmap_disable: yes maildir_copy_with_hardlinks: yes
dovecot: 2007-06-18 12:57:59 Error: IMAP(ronald@rmacd.com): Corrupted transaction log file /srv/indexes/rmacd.com/r/ronald/.INBOX/dovecot.index.log: Seen counter wrong dovecot: 2007-06-18 12:57:59 Error: IMAP(ronald@rmacd.com): Unexpected transaction log desync with index /srv/indexes/rmacd.com/r/ronald/.INBOX/dovecot.index
This log error occurs multiple times, upon each access to the transaction log. Now that the index is being held in memory, it does not seem to be posing any problems, but this is not ideal.
Ronald.
On 18/06/07, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2007-06-18 at 14:13 +0100, Ronald MacDonald wrote:
Hi list,
Overall, everything works fine, and all the emails are delivered without anything messing up. But then, from time to time, the transaction logs for some users become corrupted, meaning emails cannot be read at all from dovecot.
Actual error messages from logs would be useful. There are many reasons why Dovecot might say they're "corrupted".
-- Ronald MacDonald http://www.rmacd.com/ 0777 235 1655
Sorry, Ronald. Had to say it before somebody else did.
My kids LOVE your burgers!! :-)
Well, I am actually using ext3, how do you suspect this might affect the reliability of the transaction log?
Ronald.
On 19/06/07, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2007-06-18 at 18:04 +0100, Ronald MacDonald wrote:
dovecot: 2007-06-18 12:57:59 Error: IMAP(ronald@rmacd.com): Corrupted transaction log file /srv/indexes/rmacd.com/r/ronald/.INBOX/dovecot.index.log: Seen counter wrong
What filesystem do you use?
-- Ronald MacDonald http://www.rmacd.com/ 0777 235 1655
No, ext3 would be fine. I just thought /srv might point to NFS or something. This is a bit weird though. There shouldn't be any bugs like this with local filesystems.
You could try if mmap_disable=no would change anything, or lock_method=flock or even lock_method=dotlock.
On Tue, 2007-06-19 at 18:07 +0100, Ronald MacDonald wrote:
Well, I am actually using ext3, how do you suspect this might affect the reliability of the transaction log?
Ronald.
On 19/06/07, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2007-06-18 at 18:04 +0100, Ronald MacDonald wrote:
dovecot: 2007-06-18 12:57:59 Error: IMAP(ronald@rmacd.com): Corrupted transaction log file /srv/indexes/rmacd.com/r/ronald/.INBOX/dovecot.index.log: Seen counter wrong
What filesystem do you use?
It seems as if the flock does not have any effect on the corrupting of the transaction logs. Additionally, I would not be prepared to use dotlock as its performance is detrimental to the server's load at busy times.
Ronald.
On 27/06/07, Timo Sirainen <tss@iki.fi> wrote:
No, ext3 would be fine. I just thought /srv might point to NFS or something. This is a bit weird though. There shouldn't be any bugs like this with local filesystems.
You could try if mmap_disable=no would change anything, or lock_method=flock or even lock_method=dotlock.
On Tue, 2007-06-19 at 18:07 +0100, Ronald MacDonald wrote:
Well, I am actually using ext3, how do you suspect this might affect the reliability of the transaction log?
Ronald.
On 19/06/07, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2007-06-18 at 18:04 +0100, Ronald MacDonald wrote:
dovecot: 2007-06-18 12:57:59 Error: IMAP(ronald@rmacd.com):
Corrupted
transaction log file /srv/indexes/rmacd.com/r/ronald/.INBOX/dovecot.index.log: Seen counter wrong
What filesystem do you use?
-- Ronald MacDonald http://www.rmacd.com/ 0777 235 1655
participants (3)
-
Bruce Bodger
-
Ronald MacDonald
-
Timo Sirainen