caosiyang / py-mongo-sync

Oplog-based data sync tool that synchronizes data from a replica set to another deployment, e.g.: standalone, replica set, and sharded cluster.
http://caosiyang.github.io/py-mongo-sync/
MIT License
108 stars 46 forks source link

Sync too fast for secondary to catch up #22

Closed donarmando89 closed 5 years ago

donarmando89 commented 5 years ago

Is there any configuration to slow down sync of large DB (700GB)? I am getting the error below on the Secondary logs 2018-12-19T14:33:18.326+0300 I REPL [ReplicationExecutor] syncing from: mongo-04:27017 2018-12-19T14:33:18.333+0300 W REPL [rsBackgroundSync] we are too stale to use mongo-04:27017 as a sync source

caosiyang commented 5 years ago

No config to slow down sync speed. But you can turn this value (current 1000,000) to a large number (e.g. 1000,000,000) to disable the concurrency, then speed is slower.