Increasing the number or replication jobs #3185
Replies: 5 comments 1 reply
-
Jobs POSTed to the Could it be that your jobs crash or complete faster than you can create them, so their number stays below some threshold (100)? See if you could use _replicator docs as an experiment and see if it changes the behavior, at least you'd be able to see their termination state. The trade-off there is having to do some cleanup and manage _replicator docs yourself. |
Beta Was this translation helpful? Give feedback.
-
Hi @tudordumitriu, Thanks for explaining and for being patient. After looking at the source, I think I know what might be causing it. I forgot we had a default limit of returned jobs set to 100 for _scheduler/jobs output. It's applied here: https://github.com/apache/couchdb/blob/3.x/src/couch_replicator/src/couch_replicator_httpd.erl#L42 It basically acts as if |
Beta Was this translation helpful? Give feedback.
-
Hi @nickva Thanks |
Beta Was this translation helpful? Give feedback.
-
Thanks for double-checking @tudordumitriu. Check if there are any errors in the logs indicating that jobs are crashing soon after starting perhaps. Another thing to keep in mind is that POST-ing a replication job that has the same replication parameters as an existing job will be a no-op basically. So check if that could be the case. That means for example that creating a replication job from a -> b then and creating the same job again will still leave only one running a -> b job in the system. Wonder if you'd have a script to reproduce the issue, a python script or similar to run against the dev instance of CouchDb |
Beta Was this translation helpful? Give feedback.
-
Thanks @nickva Will try to work on such a script, because we are using speigel to replicate have to think a bit on how to create this script that replicates the environment so will take a while (at least couple of days) but will definitely get back. |
Beta Was this translation helpful? Give feedback.
-
Hi there
We are using (rather intensively) the _replicate endpoint and even though the settings replicator max_jobs is 500, the _scheduler/jobs total_rows never goes over 100.
To give a bit of context:
For now, we are using _replicate with mostly one single doc_id to replicate documents between "friend" databases, the business logic being implemented in our API, which calls the _replicate endpoint. This generates quite some load on the couchdb _replicate endpoint in our load tests and we are looking for a way to optimize this.
Of course one alternative would be to buffer those calls but by then, we would like to optimize as much as possible the couchdb replication.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions