Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 24EAD200CBC for ; Tue, 20 Jun 2017 17:24:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 23DC4160BE1; Tue, 20 Jun 2017 15:24:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6A3C4160BD3 for ; Tue, 20 Jun 2017 17:24:01 +0200 (CEST) Received: (qmail 88715 invoked by uid 500); 20 Jun 2017 15:24:00 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 88682 invoked by uid 99); 20 Jun 2017 15:24:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2017 15:24:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C8095191E38 for ; Tue, 20 Jun 2017 15:23:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.896 X-Spam-Level: X-Spam-Status: No, score=-0.896 tagged_above=-999 required=6.31 tests=[AC_DIV_BONANZA=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ZIEAYPMe-Dbw for ; Tue, 20 Jun 2017 15:23:57 +0000 (UTC) Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 6D78F62911 for ; Tue, 20 Jun 2017 15:20:46 +0000 (UTC) Received: by mail-wr0-f179.google.com with SMTP id r103so95388649wrb.0 for ; Tue, 20 Jun 2017 08:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Rb+mz6T46S7VpCX1VCxYdN8MdupblSxJgHu6m25jAJg=; b=OJU0osG+Gd31i6DDUHTDr1/LGaC+KIw5mrtoo6cc93BgO8qFSl8A3l6k40efh6g1bH Pu3LTMscts72DBl0GCbC7sUMtmCRPa4JQeivJlGVz1A2XHP6n7gVkgq58WCa2sli96Uh 5CnsfNH2QZhmHMcFSLf90iZI2RT5n4pb3FYvbJsvSGpYPWiqF/E1vot3T/4XPTn8Nl4Y cET1jOcyxTWbro8DWBaMA0nlx5hsWNypzJU+smKpocCCA+wPzMS6wRSnI6RenTEd+mn0 9tTSQvXa/hyBusH+7EEkPX0PHOqmfFYCd1QMyH/ZLaopgzmx8SqcAY3qJp/C2p3Z6GXb 3U6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Rb+mz6T46S7VpCX1VCxYdN8MdupblSxJgHu6m25jAJg=; b=XsgoRpA8TDtyrGjWE08AB86zsISskeUF6Bn3bDQC4TsSUg5ojEBGnbThQ5SqE8Kp/p ntT/1NdvhxZLb5M53evogpqtoMXyjATdR2qnbWauk0lw4icGfWxPsBwciDVFyJ6xQFkP glojUIcL295m/HVET9visUSldfWVuIuul5HWVhwY9FMB9dX1AtWVdMoSc1ok9wxMq92c SLqAw3cKJiqGxq3aHTqX73h74EUYNnSTJ+4e+44Ye0EA7MkQY/yNtBuRQEyI/jbztj1P CPrXLleodIMc1gopqCGvHrx2jMKSt6iocaLaRO9RnkO0H4/iZyTytCB1RJB5QIkHGK0+ BtNA== X-Gm-Message-State: AKS2vOxj3fef1fVKpE8BQ/sJp7luBAkB6dh93olpGmynAWE/4TMEA4oN JxQcE8IpyVzHpck4vWdVvrfhxV1P0U+D X-Received: by 10.28.47.86 with SMTP id v83mr2517800wmv.0.1497972045730; Tue, 20 Jun 2017 08:20:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.139.25 with HTTP; Tue, 20 Jun 2017 08:20:45 -0700 (PDT) In-Reply-To: References: From: Nick Vatamaniuc Date: Tue, 20 Jun 2017 11:20:45 -0400 Message-ID: Subject: Re: CouchDB config: Difference between max_replication_retry_count and retries_per_request To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary="001a11424436ab8ded055265cb4f" archived-at: Tue, 20 Jun 2017 15:24:02 -0000 --001a11424436ab8ded055265cb4f Content-Type: text/plain; charset="UTF-8" Hi Vovan, The answer is slightly different depending if you're using 1.x/2.0 releases or current master. If you're using 1.x or 2.0 release: Set "max_replication_retry_count = infinity" so it will always retry failed replications. That setting controls how the whole replication job restarts if there is any error. Then "retries_per_request" can be used to handle errors for individual replicator HTTP requests. Basically the case where a quick immediate retry succeeds. The default value for "retries_per_request" is 10. After the first failure, there is a 0.25 second wait. Then on next failure it doubles to 0.5 and so on. Max wait interval is 5 minutes. But If you expect to be offline routinely, maybe it's not worth retrying individual requests for too long so reduce the "retries_per_request" to 6 or 7. So individual requests would retry a few times for about 10 - 20 seconds then the whole replication job will crash and retry. If you're using current master, which has the new scheduling replicator: No need to set "max_replication_retry_count", that setting is gone and all replication jobs will always retry for as long as replication document exists. But "retries_per_request" works the same as above. Replication scheduler also does exponential backoffs when replication jobs fail consecutively. First backoff is 30 seconds. Then it doubles to 1 minute, 2 minutes, and so on. Max backoff wait is about 8 hours. But if you don't want to wait 4 hours on average for the replication to restart when network connectivity is restored, and want to it be about 5 minutes or so, set "max_history = 8" in the "replicator" config section. max_history controls how much history of past events are retained for each replication job. If there is less history of consecutive crashes, that backoff wait interval will also be shorter. So to summarize, for 1.x/2.0 releases: [replicator] max_replication_retry_count = infinity retries_per_request = 6 For current master: [replicator] max_history = 8 retries_per_request = 6 Cheers, -Nick On Mon, Jun 19, 2017 at 11:33 PM, Vladimir Kuznetsov wrote: > Hi, > > I'm currently exploring CouchDB replication and trying to figure out the > difference between *max_replication_retry_count* and *retries_per_request* > configuration options in *[replicator]* section of configuration file. > > Basically I want to configure continuous replication of local couchdb to > the remote instance that would never stop replication attempts, considering > potentially continuous periods of being offline(days or even weeks). So, > I'd like to have infinite replication attempts with maximum retry interval > of 5 minutes or so. Can I do this? Do I need to change default > configuration to achieve this? > > thanks, > --Vovan --001a11424436ab8ded055265cb4f--