nickva commented on issue #4639:
URL: https://github.com/apache/couchdb/issues/4639#issuecomment-1591810915

   @jdai1 no problem at all, thanks for reaching out. 
   
   The `max_backoff` error indicates that some replicator API request was 
throttled too much and it exceeded a max retry interval before the job crashes 
and restarts.
   
   Those errors are usually emitted if a [429 error 
code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) is returned 
from an HTTP API endpoint. Replication jobs would retry individual requests 
with an exponential backoff, and in the case of 429 errors it will use the 
[AIMD](https://en.wikipedia.org/wiki/Additive_increase/multiplicative_decrease) 
- additive increase, multiplicative decrease algorithm, similar to TCP to try 
to match the throttling rate. But, there is a limit to those failures as well, 
and if those requests keep getting throttled, it will crash the whole job, and 
restart it with a simpler configuration. It will apply these setting to those 
jobs:
   
   ```
   [
           {checkpoint_interval, 5000},
           {worker_processes, 2},
           {worker_batch_size, 100},
           {http_connections, 5}
    ]
   ```
   
   and re-schedule the job to run again.
   
   Even if the replication jobs will keep crashing (they are in the `crashing` 
state), they should still be restarting from time to time, trying as hard as 
they can to make some progress.
   
   So, to summarize, individual replication API requests are retried on 
failure, and then the whole replication job is continuously restarted as well. 
See the advanced replication 
[guide](https://docs.couchdb.org/en/stable/replication/replicator.html#replication-states)
 for more info about the various job states.
   
   The suggestion is to then use some settings closer those lower capacity 
setting when replicating to/from those endpoints (not sure which on of your 
endpoint is throttled, source, target or both). 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to