<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="Helvetica, Arial, sans-serif">Ok running :<br>
      <br>
      freebsd-12.1<br>
      dovecot-2.3.18.current<br>
      dovecot-2.3-pigeonhole-0.5.18.current<br>
      <br>
      simply put replication works fine on smaller email boxes without
      issues.<br>
      <br>
      dsync also works when run manually, longest sync is 60 secords or
      so when using dsync so need replicator bumped up ?<br>
      <br>
      i get the fact that the file locking issue relative since a larger
      mailbox will take longer to replicate when an email comes in ?<br>
      <br>
      mail18      03-05 18:05:51 {dovecot}        [15799] (872623573)
      doveadm(<a class="moz-txt-link-abbreviated" href="mailto:keith@elirpa.com">keith@elirpa.com</a>)<32249><GnS3M53sI2L5fQAAz1jc/w>:
      Error: Couldn't lock<br>
                                                         
      /data/dovecot/users/elirpa.com/keith@elirpa.com//tmp/.dovecot-sync.lock:<br>
                                                         
fcntl(/data/dovecot/users/elirpa.com/keith@elirpa.com//tmp/.dovecot-sync.lock,
      write-lock, F_SETLKW)<br>
                                                          locking
      failed: Timed out after 30 seconds (WRITE lock held by pid 31519)<br>
      <br>
      so what i need is where fcntl is setting a 30 second timeout for
      replication (i have adjust all the others in the src code)<br>
      <br>
      simply put replicator fails and retries and keeps failing which is
      understandable as it probably needs a little more time ?<br>
      <br>
      <font face="Courier New, Courier, monospace"># sync.users<br>
        <a class="moz-txt-link-abbreviated" href="mailto:carol@scom.ca">carol@scom.ca</a>                     none     00:02:51  08:16:34 
        -            y   <br>
        <a class="moz-txt-link-abbreviated" href="mailto:nick@elirpa.com">nick@elirpa.com</a>                   low      02:45:17  09:28:32 
        -            y   <br>
        <a class="moz-txt-link-abbreviated" href="mailto:keith@elirpa.com">keith@elirpa.com</a>                  none     02:30:13  09:28:32 
        -            y   <br>
        <a class="moz-txt-link-abbreviated" href="mailto:paul@scom.ca">paul@scom.ca</a>                      high     02:45:17  09:28:32 
        -            y   <br>
        <a class="moz-txt-link-abbreviated" href="mailto:ed@scom.ca">ed@scom.ca</a>                        none     02:34:34  09:28:32 
        -            y   <br>
        <a class="moz-txt-link-abbreviated" href="mailto:ed.hanna@dssmgmt.com">ed.hanna@dssmgmt.com</a>              high     02:45:17  09:28:32 
        -            y   <br>
      </font><br>
      i found under /programs/src/mail/dovecot-2.3.18.current/src/lib<br>
      <br>
      <font face="Courier New, Courier, monospace">file-lock.c<br>
        <br>
            struct flock fl;<br>
        <br>
            fl.l_type = lock_type;<br>
            fl.l_whence = SEEK_SET;<br>
            fl.l_start = 0;<br>
            fl.l_len = 0;<br>
        <br>
            ret = fcntl(fd, timeout_secs != 0 ? F_SETLKW : F_SETLK,
        &fl);<br>
            if (timeout_secs != 0) {<br>
              alarm(0);<br>
              file_lock_wait_end(path);<br>
            }<br>
        <br>
            if (ret == 0)<br>
              break;<br>
        <br>
            if (timeout_secs == 0 &&<br>
                (errno == EACCES || errno == EAGAIN)) {<br>
              /* locked by another process */<br>
              *error_r = t_strdup_printf(<br>
                "fcntl(%s, %s, F_SETLK) locking failed: %m "<br>
                "(File is already locked)", path, lock_type_str);<br>
              return 0;<br>
            }<br>
        <br>
            if (err_is_lock_timeout(started, timeout_secs)) {<br>
              errno = EAGAIN;<br>
              *error_r = t_strdup_printf(<br>
                "fcntl(%s, %s, F_SETLKW) locking failed: "<br>
                "Timed out after %u seconds%s",<br>
                path, lock_type_str, timeout_secs,<br>
                file_lock_find(fd, set->lock_method,<br>
                         lock_type));<br>
              return 0;<br>
            }<br>
            *error_r = t_strdup_printf("fcntl(%s, %s, %s) locking
        failed: %m",<br>
              path, lock_type_str, timeout_secs == 0 ? "F_SETLK" :
        "F_SETLKW");<br>
            if (errno == EDEADLK && !set->allow_deadlock) {<br>
              i_panic("%s%s", *error_r,<br>
                file_lock_find(fd, set->lock_method,<br>
                         lock_type));<br>
            }<br>
            return -1;<br>
        #endif<br>
      </font><br>
      <br>
      <br>
      <br>
      <br>
    </font>
    <div class="moz-signature">-- <br>
      <font color="blue">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <title></title>
        <br>
        <br>
        Happy Saturday !!!<br>
        Thanks - paul<br>
        <br>
        Paul Kudla<br>
        <br>
        <br>
        <a href="http://www.scom.ca"><img alt="Scom.ca Internet
            Services" src="cid:part1.Oh1fwPXO.8SQ7zywP@scom.ca"
            width="191" height="43" border="0"></a><br>
        004-1009 Byron Street South<br>
        Whitby, Ontario - Canada<br>
        L1N 4S3<br>
        <br>
        Toronto 416.642.7266<br>
        Main 1.866.411.7266<br>
        Fax 1.888.892.7266
      </font></div>
  </body>
</html>