XDCR stream management

XDCR stream management

New XDCR stream creation must occur a period of time after creating a bucket or after deleting a XDCR stream.

XDCR stream management Under the following circumstances, a period of time should pass (depending on the CPU load) before creating new XDCR streams:

  • After creating a bucket
  • After deleting an old XDCR stream

If a new XDCR stream is created immediately after a bucket has been created, a db_not_found error may occur. When a bucket is created, a period of time passes before the buckets are available. If XDCR tries to replicate to or from the vBucket too soon, a db_not_found error occurs. The same situation applies when other clients are “talking” to a bucket.

If a new XDCR stream is created immediately after an old XDCR stream is deleted, an Erlang eaddrinuse error occurs. This is related to the Erlang implementation of the TCP/IP protocol. After an Erlang process releases a socket, the socket stays in TIME_WAIT for a while before a new Erlang process can reuse it. If the new XDCR stream is created too quickly, vBucket replicators may encounter the eaddrinuse error and XDCR may not be able to fully start.

Note: The TIME_WAIT interval may be tunable from the operating system. If so, try lowering the interval time.