Replset error RS102 too stale to catch up

Source: Internet
Author: User

Replset error RS102 too stale to catch up


Secondary replica members need to shut down to increase memory, early shutdown, and so on the next day after the server up, to see the rs.status () information, will capture the "Statestr": "RECOVERING". In fact, has already exceeded the Maintenance window time. At this point, if you're lucky, you'll see error RS102 too stale to catch-up errors. And the error is captured every 10 minutes. From the MongoDB log file you can see:

Thu mar 26 20:50:48.561 [rsbackgroundsync] replset error rs102 too  stale to catch up, at least from dal05mgo13.sl.dx:27017thu mar  26 20:50:48.561 [rsbackgroundsync] replset error rs102 too stale  to catch upThu Mar 26 21:00:49.632 [rsBackgroundSync] replSet  error rs102 too stale to catch up, at least from  Dal05mgo13.sl.dx:27017thu mar 26 21:00:49.632 [rsbackgroundsync] replset error  rs102 too stale to catch upthu mar 26 21:10:50.701 [ Rsbackgroundsync] replset error rs102 too stale to catch up, at  least from dal05mgo12.sl.dx:27017thu mar 26 21:10:50.701 [rsbackgroundsync ] replset error rs102 too stale to catch upThu Mar 26 21:20:51.770 [rsBackgroundSync]  Replset error rs102 too stale to catch up, at least from  dal05mgo13.sl.dx:27017Thu Mar 26 21:20:51.770 [rsBackgroundSync] replSet  Error rs102 too stale to catch up

Confirm Maintenance window Size


To view the Maintenance window and oplog size of the primary replica:

Rs_main:primary> db.printreplicationinfo () configured Oplog size:23552mblog length start to End:38133secs (10.59hrs) Oplog First event Time:mon Mar 12:00:13 GMT-0500 (CDT) Oplog last event Time:mon April 22:35:46 GMT-0500 (C DT) Now:mon Mar 22:35:46 GMT-0500 (CDT)

You can see that the Maintenance window is 10 hours and the Oplog size is 23G.

The Maintenance window size of the secondary replica is best consistent with the primary replica members so that the secondary replica can hold oplog that are synchronized from the primary replica.

How to rebuild Oplog ?


Start with standalone and execute the following delete and create script:

> Use local> db.oplog.rs.drop () > Db.createcollection ("oplog.rs", {"capped": true, "size": 23 * 1024 * 1024 * 10 24}) or > Db.runcommand ({create: "oplog.rs", Capped:true, Size: (23 * 1024 * 1024 * 1024)})

replset error RS102 too stale to catch up how to deal with?


Replica set error RS102 too old to keep up. Indicates that this node has not been keeping up with the entire cluster because it has been away from the replica set for too long. The secondary replica member needs to be resynchronized. Refer to:

http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/

The official manual recommends that you fully resynchronize members by removing the data to implement initialization synchronization (initial sync).

MongoDB provides two ways to implement initialization synchronization:

    • Clear the Data directory and restart Mongod. Let the normal initialization of MONGODB synchronize data recovery data. This method is simpler, but it takes more time to replace the data.

    • Copy the current data directory from another member in the replica set and restart the machine. This process replaces the data faster, but requires more manual steps.



This article is from the SQL Server deep dives blog, so be sure to keep this source http://ultrasql.blog.51cto.com/9591438/1626753

Replset error RS102 too stale to catch up

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.