MongoDB Documentation, Release 3.0.4 Use the database profiler to see if there are slow queries or long-running operations that correspond to the incidences of lag. If you are performing a large data ingestion or bulk load operation that requires a large number of writes to the primary, particularly with unacknowledged write concern (page 78), the secondaries will not be able to read the oplog fast enough to keep up with changes. To prevent this, require write acknowledgment or journaled write concern (page 78) after every 100, 1,000, or an another interval to provide an opportunity for secondaries to catch up with the primary. For more information see: All members of a replica set must be able to connect to every other member of the set to support replication. Always verify connections in both “directions.” Networking topologies and firewall configurations can prevent normal and required connectivity, which can block replication. Consider the following example of a bidirectional test of networking: Given a replica set with three members running on three separate hosts: Chapter 9. Replication 648 • Appropriate Write Concern – Replica Acknowledge Write Concern (page 80) – Replica Set Write Concern (page 84) – Oplog Size (page 593) • m1.example.net • m2.example.net • m3.example.net 1. Test the connection from m1.example.net to the other hosts with the following operation set m1.example.net : 2. Test the connection from m2.example.net to the other two hosts with the following operation set from m2.example.net , as in: 3. Test the connection from m3.example.net to the other two hosts with the following operation set from the m3.example.net host, as in: You have now tested the connection between m2.example.net and m1.example.net in both directions. mongo --host m2.example.net --port 27017 mongo --host m3.example.net --port 27017 mongo --host m1.example.net --port 27017 mongo --host m3.example.net --port 27017 mongo --host m1.example.net --port 27017 mongo --host m2.example.net --port 27017 Test Connections Between all Members Example