Hi Sebastian,
I wonder if you could tell us the problem you are trying to solve. The autoresync command is used to resync the slave when the slave becomes out of sync with the primary. Under normal circumstances it should be up to date with the primary and not need to resync. If your environment is autoresyncing every time it is available to do so, then we should figure out why it is falling out of sync so often.
I'm not aware of any way to reduce or tune the time the slave checks for being out of sync (to trigger an autoresync). The documentation tells us that it will autoresync if it is 10 secs out of sync with the master. It also tells us that the autoresync will not happen more than once every ten minutes. You should not be seeing an autoresync every 2 - 3 minutes.
Have you considered the use of replica sets? Replica sets are the newer and much improved method to achieve durability, amongst other benefits. They have many advantages over master-slave replication.
Cheers,
André
On Thursday, September 27, 2012 7:40:16 AM UTC+10, Sebastian Cabeza wrote:
I have 1 slave server running with --autoresync command and I know it syncs automatically every 2.3~ mins. Is there a command or value to configure in mongodb.conf to set this interval of time?
In other words:
Sync > Every 2.3~ minutes.
I want:
Sync > Every 30 seconds or 1 minute.
How can I configure that?
Thanks in advance!
Sebastian.