Mongosync utility oplog time resume is not possible

hello guys hope you are doing well , iam using mongosync utility to sync two cluster which i achieved successfully ,but i want this sync to happen everytime i have installed utility in ec2 ubuntu instance how do i run the commands all the time and since today iam not able to intiate the syncing
iam getting the following error
“error”:"(ChangeStreamHistoryLost) PlanExecutor error during aggregation :: caused by :: Resume of change stream was not possible, as the resume point may no longer be in the oplog.",“time”:“2022-12-15T11:31:02.443635973+03:00”,“message”:“Error during replication”}

would be very happy if someone could share some suggestion and resolution, thanks

Hi @mohamed_aslam

The error indicates the sync is attempting to resume an existing sync. To do that the oplog must be large enough to cope with the time the sync is not running.

You can use replSetResizeOplog to resize the oplog.

my source cluster has oplog window of 6 hours and destination 24hrs which is default, how to do i keep the sync 24/7 without interruption

any suggestion,please i would be glad becuase we want to implement the syncing for reporting and analytic purpose ,please any help would be very highly appreciated and iam struck with this error

You need to make sure that the source oplog window is large enough to cover the initial data copy and whatever pause/resume intervals you have. If you check the mongosync logs, you will see when it started the data copy and when it finished - most likely it took longer than 6 hours. In general, your oplog window should be larger than 6 hours (best practice is 24-48 hours)