[Dovecot] Lock problem

Simon Gao Simon.Gao at schrodinger.com
Thu Nov 5 20:01:34 EET 2009


Hi,

I now find more information about the locking problem.

Users have multiple active imap connection from same machine for example:

13946 ?        S      0:00 imap [user1 192.168.1.11]
14491 ?        S      0:00 imap [user2 192.168.1.11]
28504 ?        S      0:00 imap [user1 192.168.1.11]
29040 ?        S      0:00 imap [user2 192.168.1.11]
29041 ?        S      0:00 imap [user2 192.168.1.11]

The /var/spool/mail is on NFS share. 

Running strace on 13946 and 28504:

# strace -p 13946                     
Process 13946 attached - interrupt to quit       
gettimeofday({1257443764, 885542}, {0, 0}) = 0   
gettimeofday({1257443764, 885682}, NULL) = 0     
epoll_wait(6, {}, 4, 1079)              = 0      
gettimeofday({1257443765, 965259}, {0, 0}) = 0   
gettimeofday({1257443765, 965392}, NULL) = 0     
epoll_wait(6, {}, 4, 5000)              = 0      
gettimeofday({1257443770, 965380}, {0, 0}) = 0   
gettimeofday({1257443770, 965531}, NULL) = 0     
epoll_wait(6, {}, 4, 5000)              = 0      
gettimeofday({1257443775, 965409}, {0, 0}) = 0   
gettimeofday({1257443775, 965555}, NULL) = 0     
epoll_wait(6, {}, 4, 5000)              = 0      
gettimeofday({1257443780, 965498}, {0, 0}) = 0   
gettimeofday({1257443780, 965639}, NULL) = 0     
epoll_wait(6, {}, 4, 5000)              = 0      
gettimeofday({1257443785, 965779}, {0, 0}) = 0   
gettimeofday({1257443785, 965924}, NULL) = 0     
epoll_wait(6, {}, 4, 5000)              = 0      
gettimeofday({1257443790, 969831}, {0, 0}) = 0   
gettimeofday({1257443790, 969969}, NULL) = 0     
epoll_wait(6, {}, 4, 3111)              = 0      
gettimeofday({1257443794, 89867}, {0, 0}) = 0    
writev(1, [{"* OK Still here"..., 15}, {"\r\n"..., 2}], 2) = 17
gettimeofday({1257443794, 90356}, NULL) = 0                    
stat64("/var/mail/user1", {st_mode=S_IFREG|0600, st_size=8603552, ...}) = 0
gettimeofday({1257443794, 103769}, NULL) = 0                               
epoll_wait(6, {}, 4, 1866)              = 0                                
gettimeofday({1257443795, 969925}, {0, 0}) = 0                             
gettimeofday({1257443795, 970063}, NULL) = 0                               
epoll_wait(6, {}, 4, 4999)              = 0                                
gettimeofday({1257443800, 970025}, {0, 0}) = 0                             
gettimeofday({1257443800, 970156}, NULL) = 0                               
epoll_wait(6, {}, 4, 5000)              = 0                                
gettimeofday({1257443805, 970088}, {0, 0}) = 0                             
gettimeofday({1257443805, 970221}, NULL) = 0                               
epoll_wait(6, {}, 4, 5000)              = 0                                
gettimeofday({1257443810, 970121}, {0, 0}) = 0                             
gettimeofday({1257443810, 970261}, NULL) = 0                               
epoll_wait(6, {}, 4, 5000)              = 0


# strace -p 28504
Process 28504 attached - interrupt to quit
gettimeofday({1257443943, 506081}, {0, 0}) = 0
gettimeofday({1257443943, 506235}, NULL) = 0
epoll_wait(6, {}, 4, 22730)             = 0
gettimeofday({1257443966, 226716}, {0, 0}) = 0
gettimeofday({1257443966, 226855}, NULL) = 0
epoll_wait(6, {}, 4, 10)                = 0
gettimeofday({1257443966, 236612}, {0, 0}) = 0
stat64("/var/mail/user1", {st_mode=S_IFREG|0600, st_size=8603552, ...}) = 0
gettimeofday({1257443966, 259124}, NULL) = 0
epoll_wait(6,

Both imap connections try to access same /var/mail/user1 file. This caused 
very slow performance. 

Why are there multiple active imap connections? How to stop it?

Thanks,

Simon 

            


More information about the dovecot mailing list