Re: [Dovecot] Dovecot lock problem

2009-11-04 Thread Simon Gao
> >What is the process doing? Check with "strace -p "?
> >How large is the user's mailbox?

We just have another user reporting problem. There is no lock on 
/var/spool/mail/ file. 

The strace has following:

 # strace -p 8117
Process 8117 attached - interrupt to quit
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362101
 
alarm(5)= 0 
 
time(NULL)  = 1257362101
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362106
 
alarm(5)= 0 
 
time(NULL)  = 1257362106
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362111
 
alarm(5)= 0 
 
time(NULL)  = 1257362111
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362116
 
alarm(5)= 0 
 
time(NULL)  = 1257362116
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362121
 
alarm(5)= 0 
 
time(NULL)  = 1257362121
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362126
 
alarm(5)= 0 
 
time(NULL)  = 1257362126
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362131
 
alarm(5)= 0 
 
time(NULL)  = 1257362131
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 
0xff9f4db4) = ? ERESTARTSYS (To be restarted)   
  
--- SIGALRM (Alarm clock) @ 0 (0) ---   
 
sigreturn() = ? (mask now [])   
 
time(NULL)  = 1257362136
 
alarm(5)= 0 
 
time(NULL)  = 1257362136
 
fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 

Re: [Dovecot] Dovecot lock problem

2009-10-16 Thread Simon Gao
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/.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 "?
> > >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. 


[Dovecot] Dovecot lock problem

2009-10-16 Thread Simon Gao
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/.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 "?
>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.




[Dovecot] Dovecot lock problem

2009-10-13 Thread Simon Gao

Hi,

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/.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.


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


We are running Dovecot 1.1.2. Any pointer to resolve this problem is 
appreciated.


Simon


[Dovecot] How to restore old mailbox

2007-12-21 Thread Simon Gao
Hi,

I have issue with one user mailbox in /var/spool/mail. I have to restore
older version of the same mailbox file over the newer one. What's the
best way to do this?

Simon


[Dovecot] Possible to run two dovecot accessing same directory?

2007-07-24 Thread Simon Gao

Hi,

Just wonder if it's possible to run two dovecot servers on two different 
machines, but serve out of the same directories.


I would like to test second dovecot server before switching from first 
one to second one.


Any suggestions?

Simon


[Dovecot] Mbox vs maildir

2007-07-01 Thread Simon Gao
> The upcoming dbox and cydir formats of course beat everything in
> performance :)


Is dbox in Dovecot 1.1 tree now? Is it the redesigned dbox? How close is dbox 
ready for general use? 

I am interested in testing it out. Where can I find instruction on how to 
configure dovecot to use dbox?

Simon