Hi Kiril,

The answer is in the error:
"Target database out of sync. Try to increase max_dbs_open at the
target's server."

This happens when[1] instance_start_time value for Target db had
changed during replication. CouchDB monitors it in order to detect
server restart, but it's also happens when max_dbs_open is lower when
actual number of active databases on server: in this case CouchDB
closes fd for some dbs in order to be able to work with the other
following by inner lru cache.

The reason why replication get shutdown is that this situation also
falls under the edge case when Target (and Source too) database could
be changed in the middle of replication (cleared by DELETE with
following PUT, or restored from backup with server instance restart).
In this case CouchDB won't continue replication, but starts it over
again to make sure that all the documents will be replicated
correctly..

[1]: 
https://github.com/apache/couchdb-couch-replicator/blob/master/src/couch_replicator.erl#L784-L786

--
,,,^..^,,,


On Fri, Aug 7, 2015 at 12:09 PM, Kiril Stankov <[email protected]> wrote:
> Hi all,
>
> I see few errors like the one below.
> Any idea what the reason can be?
> Why a replication issue should lead to shutdown?
>
> Thanks in advance.
>
>
> [Fri, 07 Aug 2015 08:05:52 GMT] [error] [<0.91.0>] {error_report,<0.31.0>,
>                        {<0.91.0>,supervisor_report,
> [{supervisor,{local,couch_replicator_job_sup}},
>                          {errorContext,child_terminated},
>                          {reason,
>                              {checkpoint_commit_failure,
>                                  <<"Target database out of sync. Try to
> increase max_dbs_open at the target's server.">>}},
>                          {offender,
>                              [{pid,<0.199.0>},
>                               {name,
> "848c572641fd68bf9084a2f465f4d8ba+continuous+create_target"},
> {mfargs,{gen_server,start_link,undefined}},
>                               {restart_type,temporary},
>                               {shutdown,250},
>                               {child_type,worker}]}]}}

Reply via email to