<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>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.</p>
    <p>Does anybody have a solution?<br>
    </p>
    <p>Kind regards</p>
    <div class="moz-cite-prefix">On 07/09/20 15:53, Daniel Botting
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:f90685fd-bfb2-9558-d9bc-10104a80d392@codethink.co.uk">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Dear Sirs,</p>
      <p>Further to my last email have any list members seen this before
        and are able to offer advice on how to resolve this please.</p>
      <p>I should note as well that we are running Dovecot from the
        upstream Debian packages at <a class="moz-txt-link-freetext"
          href="https://repo.dovecot.org/ce-2.3-latest/debian/buster"
          moz-do-not-send="true">https://repo.dovecot.org/ce-2.3-latest/debian/buster</a>
        .<br>
      </p>
      <p>Kind regards</p>
      <p>Daniel<br>
      </p>
      <div class="moz-forward-container"><br>
        <br>
        -------- Forwarded Message --------
        <table class="moz-email-headers-table" cellspacing="0"
          cellpadding="0" border="0">
          <tbody>
            <tr>
              <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Subject:
              </th>
              <td>Dsync replication - delayed replication (Sync lock)</td>
            </tr>
            <tr>
              <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Date:
              </th>
              <td>Tue, 1 Sep 2020 16:17:15 +0100</td>
            </tr>
            <tr>
              <th valign="BASELINE" nowrap="nowrap" align="RIGHT">From:
              </th>
              <td>Daniel Botting <a class="moz-txt-link-rfc2396E"
                  href="mailto:daniel.botting@codethink.co.uk"
                  moz-do-not-send="true"><daniel.botting@codethink.co.uk></a></td>
            </tr>
            <tr>
              <th valign="BASELINE" nowrap="nowrap" align="RIGHT">To: </th>
              <td><a class="moz-txt-link-abbreviated
                  moz-txt-link-freetext"
                  href="mailto:dovecot@dovecot.org"
                  moz-do-not-send="true">dovecot@dovecot.org</a></td>
            </tr>
          </tbody>
        </table>
        <br>
        <br>
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <p>Hi,</p>
        <p><b>Our setup:</b></p>
        <p>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. <br>
        </p>
        <p><b>What should happen:</b></p>
        <p>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.</p>
        <p><b>What actually happens:</b></p>
        <p>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.</p>
        <p>Error message seen in mail.err:<br>
        </p>
        <p>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)</p>
        <p>Process 3697 is dovecot/doveadm-server.<br>
        </p>
        <p><b>Doveconf -n output:</b></p>
        <p># 2.3.10.1 (a3d0e1171): /etc/dovecot/dovecot.conf<br>
          # Pigeonhole version 0.5.10 (67bf5bd7)<br>
          # OS: Linux 4.19.0-10-amd64 x86_64 Debian 10.5 <br>
          # Hostname: <server hostname><br>
          auth_verbose = yes<br>
          default_vsz_limit = 0<br>
          doveadm_password = # hidden, use -P to show it<br>
          first_valid_gid = 8<br>
          first_valid_uid = 8<br>
          last_valid_gid = 8<br>
          last_valid_uid = 8<br>
          lda_mailbox_autocreate = yes<br>
          lda_mailbox_autosubscribe = yes<br>
          mail_gid = 8<br>
          mail_location = <a class="moz-txt-link-freetext" href="maildir:~/Maildir">maildir:~/Maildir</a><br>
          mail_plugins = " notify replication"<br>
          mail_uid = 8<br>
          managesieve_notify_capability = mailto<br>
          managesieve_sieve_capability = fileinto reject envelope
          encoded-character vacation subaddress
          comparator-i;ascii-numeric relational regex im<br>
          ap4flags copy include variables body enotify environment
          mailbox date index ihave duplicate mime foreverypart
          extracttext editheader imapfla<br>
          gs<br>
          namespace inbox {<br>
            inbox = yes<br>
            location = <br>
            mailbox Drafts {<br>
              special_use = \Drafts<br>
            }<br>
            mailbox Junk {<br>
              special_use = \Junk<br>
            }<br>
            mailbox Sent {<br>
              special_use = \Sent<br>
           }<br>
            mailbox "Sent Messages" {<br>
              special_use = \Sent<br>
            }<br>
            mailbox Trash {<br>
              special_use = \Trash<br>
            }<br>
            prefix = <br>
          }<br>
          passdb {<br>
            args = /etc/dovecot/dovecot-ldap.conf.ext<br>
            driver = ldap<br>
          }<br>
          plugin {<br>
            mail_replica = tcps:<server being replicated
          to>:<port being used><br>
            sieve = ~/.dovecot.sieve<br>
            sieve_dir = ~/sieve<br>
            sieve_extensions = +editheader +imapflags<br>
          }<br>
          postmaster_address = postmaster@<domain address><br>
          protocols = " imap sieve pop3"<br>
          replication_max_conns = 12<br>
          service aggregator {<br>
            fifo_listener replication-notify-fifo {<br>
              user = mail<br>
            }<br>
            unix_listener replication-notify {<br>
              user = mail<br>
            }<br>
          }<br>
          service auth {<br>
            unix_listener /var/run/dovecot-exim-bridge {<br>
              mode = 0660<br>
              user = Debian-exim<br>
            }<br>
          }<br>
          service doveadm {<br>
            inet_listener {<br>
              port = <port being used for replication><br>
              ssl = yes<br>
            }<br>
          }<br>
          service imap-login {<br>
            inet_listener imap {<br>
              port = 143<br>
            }<br>
            }<br>
            inet_listener imaps {<br>
              port = 993<br>
              ssl = yes<br>
            }<br>
            process_limit = 512<br>
            process_min_avail = 4<br>
            service_count = 1<br>
          }<br>
          service imap {<br>
            process_limit = 1024<br>
          }<br>
          service managesieve-login {<br>
            inet_listener sieve {<br>
              port = <sieve port><br>
            }<br>
            process_min_avail = 1<br>
            service_count = 8<br>
            vsz_limit = 256 M<br>
          }<br>
          service managesieve {<br>
            process_limit = 1024<br>
          }<br>
          service replicator {<br>
            process_min_avail = 1<br>
            unix_listener replicator-doveadm {<br>
              mode = 0666<br>
            }<br>
          }<br>
          ssl = required<br>
          ssl_cert = </path/to/ssl/cert/fullchain.pem<br>
          ssl_cipher_list = <a class="moz-txt-link-freetext" href="ALL:!LOW:!SSLv2:!EXP:!aNULL">ALL:!LOW:!SSLv2:!EXP:!aNULL</a><br>
          ssl_client_ca_dir = /etc/ssl/certs<br>
          ssl_key = # hidden, use -P to show it<br>
          ssl_min_protocol = TLSv1.2<br>
          userdb {<br>
            args = /etc/dovecot/dovecot-ldap.conf.ext<br>
            driver = ldap<br>
            override_fields = home=/var/mail/%u uid=mail gid=mail<br>
          }<br>
          protocol lda {<br>
            mail_plugins = " notify replication sieve"<br>
          }<br>
          protocol imap {<br>
            mail_max_userip_connections = 32<br>
            mail_plugins = " notify replication"<br>
          }<br>
          protocol sieve {<br>
            mail_max_userip_connections = 10<br>
            managesieve_logout_format = bytes=%i/%o<br>
            managesieve_max_line_length = 65536<br>
          }<br>
          <br>
        </p>
        <p>Kind regards</p>
        <p>Daniel</p>
      </div>
    </blockquote>
  </body>
</html>