Daniel Botting
2020-Sep-07 13:53 UTC
Fwd: Dsync replication - delayed replication (Sync lock)
Dear Sirs, Further to my last email have any list members seen this before and are able to offer advice on how to resolve this please. I should note as well that we are running Dovecot from the upstream Debian packages at https://repo.dovecot.org/ce-2.3-latest/debian/buster . Kind regards Daniel -------- Forwarded Message -------- Subject: Dsync replication - delayed replication (Sync lock) Date: Tue, 1 Sep 2020 16:17:15 +0100 From: Daniel Botting <daniel.botting at codethink.co.uk> To: dovecot at dovecot.org Hi, *Our setup:* Two Debian 10 machines that are setup to replicate mail between them, we have round robin DNS setup so a user can connect to either server. *What should happen:* Mail is delivered to either server and replicated across straight away to their mailbox on the other server so it does not matter which one they are connected to they will receive it fairly soon after delivery. *What actually happens:* In some instances the user will experience a delayed receipt of messages if they are not connected to the server that the message is initially delivered to, sometimes the delay is 5/10 minutes, we had a recent support ticket submitted where it was over an hour. Error message seen in mail.err: Sep? 1 10:16:15 <host name> dovecot: dsync-local(<username>)<WELSGEERTl8FEAAAZJ7A9A>: Error: Couldn't lock /path/to/mailbox/.dovecot-sync.lock: fcntl(/path/to/mailbox/.dovecot-sync.lock, write-lock, F_SETLKW) locking failed: Timed out after 30 seconds (WRITE lock held by pid 3697) Process 3697 is dovecot/doveadm-server. *Doveconf -n output:* # 2.3.10.1 (a3d0e1171): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.10 (67bf5bd7) # OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.5 # Hostname: <server hostname> auth_verbose = yes default_vsz_limit = 0 doveadm_password = # hidden, use -P to show it first_valid_gid = 8 first_valid_uid = 8 last_valid_gid = 8 last_valid_uid = 8 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes mail_gid = 8 mail_location = maildir:~/Maildir mail_plugins = " notify replication" mail_uid = 8 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex im ap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext editheader imapfla gs namespace inbox { ? inbox = yes ? location ? mailbox Drafts { ??? special_use = \Drafts ? } ? mailbox Junk { ??? special_use = \Junk ? } ? mailbox Sent { ??? special_use = \Sent ?} ? mailbox "Sent Messages" { ??? special_use = \Sent ? } ? mailbox Trash { ??? special_use = \Trash ? } ? prefix } passdb { ? args = /etc/dovecot/dovecot-ldap.conf.ext ? driver = ldap } plugin { ? mail_replica = tcps:<server being replicated to>:<port being used> ? sieve = ~/.dovecot.sieve ? sieve_dir = ~/sieve ? sieve_extensions = +editheader +imapflags } postmaster_address = postmaster@<domain address> protocols = " imap sieve pop3" replication_max_conns = 12 service aggregator { ? fifo_listener replication-notify-fifo { ??? user = mail ? } ? unix_listener replication-notify { ??? user = mail ? } } service auth { ? unix_listener /var/run/dovecot-exim-bridge { ??? mode = 0660 ??? user = Debian-exim ? } } service doveadm { ? inet_listener { ??? port = <port being used for replication> ??? ssl = yes ? } } service imap-login { ? inet_listener imap { ??? port = 143 ? } ? } ? inet_listener imaps { ??? port = 993 ??? ssl = yes ? } ? process_limit = 512 ? process_min_avail = 4 ? service_count = 1 } service imap { ? process_limit = 1024 } service managesieve-login { ? inet_listener sieve { ??? port = <sieve port> ? } ? process_min_avail = 1 ? service_count = 8 ? vsz_limit = 256 M } service managesieve { ? process_limit = 1024 } service replicator { ? process_min_avail = 1 ? unix_listener replicator-doveadm { ??? mode = 0666 ? } } ssl = required ssl_cert = </path/to/ssl/cert/fullchain.pem ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL ssl_client_ca_dir = /etc/ssl/certs ssl_key = # hidden, use -P to show it ssl_min_protocol = TLSv1.2 userdb { ? args = /etc/dovecot/dovecot-ldap.conf.ext ? driver = ldap ? override_fields = home=/var/mail/%u uid=mail gid=mail } protocol lda { ? mail_plugins = " notify replication sieve" } protocol imap { ? mail_max_userip_connections = 32 ? mail_plugins = " notify replication" } protocol sieve { ? mail_max_userip_connections = 10 ? managesieve_logout_format = bytes=%i/%o ? managesieve_max_line_length = 65536 } Kind regards Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200907/af1eb33e/attachment.html>
Claudio Corvino
2022-Jan-25 10:20 UTC
Fwd: Dsync replication - delayed replication (Sync lock)
Hi, we have the same issue and the same configuration except for Dovecot version, ours is the latest into Dovecot repo; in addition we do not have DNS round robin. Does anybody have a solution? Kind regards On 07/09/20 15:53, Daniel Botting wrote:> > Dear Sirs, > > Further to my last email have any list members seen this before and > are able to offer advice on how to resolve this please. > > I should note as well that we are running Dovecot from the upstream > Debian packages at https://repo.dovecot.org/ce-2.3-latest/debian/buster . > > Kind regards > > Daniel > > > > -------- Forwarded Message -------- > Subject: Dsync replication - delayed replication (Sync lock) > Date: Tue, 1 Sep 2020 16:17:15 +0100 > From: Daniel Botting <daniel.botting at codethink.co.uk> > To: dovecot at dovecot.org > > > > Hi, > > *Our setup:* > > Two Debian 10 machines that are setup to replicate mail between them, > we have round robin DNS setup so a user can connect to either server. > > *What should happen:* > > Mail is delivered to either server and replicated across straight away > to their mailbox on the other server so it does not matter which one > they are connected to they will receive it fairly soon after delivery. > > *What actually happens:* > > In some instances the user will experience a delayed receipt of > messages if they are not connected to the server that the message is > initially delivered to, sometimes the delay is 5/10 minutes, we had a > recent support ticket submitted where it was over an hour. > > Error message seen in mail.err: > > Sep? 1 10:16:15 <host name> dovecot: > dsync-local(<username>)<WELSGEERTl8FEAAAZJ7A9A>: Error: Couldn't lock > /path/to/mailbox/.dovecot-sync.lock: > fcntl(/path/to/mailbox/.dovecot-sync.lock, write-lock, F_SETLKW) > locking failed: Timed out after 30 seconds (WRITE lock held by pid 3697) > > Process 3697 is dovecot/doveadm-server. > > *Doveconf -n output:* > > # 2.3.10.1 (a3d0e1171): /etc/dovecot/dovecot.conf > # Pigeonhole version 0.5.10 (67bf5bd7) > # OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.5 > # Hostname: <server hostname> > auth_verbose = yes > default_vsz_limit = 0 > doveadm_password = # hidden, use -P to show it > first_valid_gid = 8 > first_valid_uid = 8 > last_valid_gid = 8 > last_valid_uid = 8 > lda_mailbox_autocreate = yes > lda_mailbox_autosubscribe = yes > mail_gid = 8 > mail_location = maildir:~/Maildir > mail_plugins = " notify replication" > mail_uid = 8 > managesieve_notify_capability = mailto > managesieve_sieve_capability = fileinto reject envelope > encoded-character vacation subaddress comparator-i;ascii-numeric > relational regex im > ap4flags copy include variables body enotify environment mailbox date > index ihave duplicate mime foreverypart extracttext editheader imapfla > gs > namespace inbox { > ? inbox = yes > ? location > ? mailbox Drafts { > ??? special_use = \Drafts > ? } > ? mailbox Junk { > ??? special_use = \Junk > ? } > ? mailbox Sent { > ??? special_use = \Sent > ?} > ? mailbox "Sent Messages" { > ??? special_use = \Sent > ? } > ? mailbox Trash { > ??? special_use = \Trash > ? } > ? prefix > } > passdb { > ? args = /etc/dovecot/dovecot-ldap.conf.ext > ? driver = ldap > } > plugin { > ? mail_replica = tcps:<server being replicated to>:<port being used> > ? sieve = ~/.dovecot.sieve > ? sieve_dir = ~/sieve > ? sieve_extensions = +editheader +imapflags > } > postmaster_address = postmaster@<domain address> > protocols = " imap sieve pop3" > replication_max_conns = 12 > service aggregator { > ? fifo_listener replication-notify-fifo { > ??? user = mail > ? } > ? unix_listener replication-notify { > ??? user = mail > ? } > } > service auth { > ? unix_listener /var/run/dovecot-exim-bridge { > ??? mode = 0660 > ??? user = Debian-exim > ? } > } > service doveadm { > ? inet_listener { > ??? port = <port being used for replication> > ??? ssl = yes > ? } > } > service imap-login { > ? inet_listener imap { > ??? port = 143 > ? } > ? } > ? inet_listener imaps { > ??? port = 993 > ??? ssl = yes > ? } > ? process_limit = 512 > ? process_min_avail = 4 > ? service_count = 1 > } > service imap { > ? process_limit = 1024 > } > service managesieve-login { > ? inet_listener sieve { > ??? port = <sieve port> > ? } > ? process_min_avail = 1 > ? service_count = 8 > ? vsz_limit = 256 M > } > service managesieve { > ? process_limit = 1024 > } > service replicator { > ? process_min_avail = 1 > ? unix_listener replicator-doveadm { > ??? mode = 0666 > ? } > } > ssl = required > ssl_cert = </path/to/ssl/cert/fullchain.pem > ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL > ssl_client_ca_dir = /etc/ssl/certs > ssl_key = # hidden, use -P to show it > ssl_min_protocol = TLSv1.2 > userdb { > ? args = /etc/dovecot/dovecot-ldap.conf.ext > ? driver = ldap > ? override_fields = home=/var/mail/%u uid=mail gid=mail > } > protocol lda { > ? mail_plugins = " notify replication sieve" > } > protocol imap { > ? mail_max_userip_connections = 32 > ? mail_plugins = " notify replication" > } > protocol sieve { > ? mail_max_userip_connections = 10 > ? managesieve_logout_format = bytes=%i/%o > ? managesieve_max_line_length = 65536 > } > > Kind regards > > Daniel >-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20220125/8de5fd78/attachment-0001.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3517 bytes Desc: S/MIME Cryptographic Signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20220125/8de5fd78/attachment-0001.bin>