1

I've setup a mongodb cluster, MongoDB shell version: 2.6.11. About five days ago I performed a mongorestore on the primary database. The size of the restore is about 2Gigabytes.

Right now, one database is still syncing. I'm not sure if this normal, or there is an issue somewhere. I restarted mongod once on the mongo-one server.

Output of rs.status()

rsOrder:SECONDARY> rs.status()
{
    "set" : "ReplName",
    "date" : ISODate("2016-11-16T07:52:28Z"),
    "myState" : 2,
    "syncingTo" : "mongo-two:27017",
    "members" : [
        {
            "_id" : 0,
            "name" : "mongo-two:27017",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 167670,
            "optime" : Timestamp(1478864074, 8643),
            "optimeDate" : ISODate("2016-11-11T11:34:34Z"),
            "lastHeartbeat" : ISODate("2016-11-16T07:52:26Z"),
            "lastHeartbeatRecv" : ISODate("2016-11-16T07:52:27Z"),
            "pingMs" : 0,
            "syncingTo" : "mongo-three:27017"
        },
        {
            "_id" : 1,
            "name" : "mongo-one:27017",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 167673,
            "optime" : Timestamp(1478864074, 8643),
            "optimeDate" : ISODate("2016-11-11T11:34:34Z"),
            "self" : true
        },
        {
            "_id" : 2,
            "name" : "mongo-three:27017",
            "health" : 1,
            "state" : 1,
            "stateStr" : "PRIMARY",
            "uptime" : 72642,
            "optime" : Timestamp(1478864074, 8643),
            "optimeDate" : ISODate("2016-11-11T11:34:34Z"),
            "lastHeartbeat" : ISODate("2016-11-16T07:52:28Z"),
            "lastHeartbeatRecv" : ISODate("2016-11-16T07:52:27Z"),
            "pingMs" : 0,
            "electionTime" : Timestamp(1479210113, 1),
            "electionDate" : ISODate("2016-11-15T11:41:53Z")
        }
    ],
    "ok" : 1
}

Output of my log:

2016-11-16T08:52:42.342+0100 [ConnectBG] BackgroundJob starting: ConnectBG
2016-11-16T08:52:42.342+0100 [rsHealthPoll] connected to server mongo-two:27017 (10.144.4.41)
2016-11-16T08:52:43.152+0100 [conn11181] command admin.$cmd command: replSetHeartbeat { replSetHeartbeat: "ReplName", v: 6, pv: 1, checkEmpty: false, from: "clp-dbmg-p03:27017", fromId: 2 } ntoreturn:1 keyUpdates:0 numYields:0  reslen:157 0ms
2016-11-16T08:52:43.772+0100 [conn11179] command admin.$cmd command: replSetHeartbeat { replSetHeartbeat: "ReplName", v: 6, pv: 1, checkEmpty: false, from: "clp-dbmg-p02:27017", fromId: 0 } ntoreturn:1 keyUpdates:0 numYields:0  reslen:157 0ms
2016-11-16T08:52:45.153+0100 [conn11181] command admin.$cmd command: replSetHeartbeat { replSetHeartbeat: "ReplName", v: 6, pv: 1, checkEmpty: false, from: "clp-dbmg-p03:27017", fromId: 2 } ntoreturn:1 keyUpdates:0 numYields:0  reslen:157 0ms
...

Is this normal, or should I take action?

0

1 Answer 1

1

Answer generated from question comments by Stennie:

By "database is still syncing", I assume you are referring to the syncingTo message in the rs.status() output. This just informational and shows which member a secondary is syncing from.

All of your replica set members currently have the same optime so there is no replication lag and this is a normal state. For more detail see my answer to a similar question on Stack Overflow:

MongoDB replica set - always shows “syncingTo”

I would also note that MongoDB 2.6 reached End of Life as of last month (Oct, 2016) which means there will be no further maintenance releases. I would highly recommend upgrading to a supported release, particularly if this is a new deployment. The latest production release series is currently MongoDB 3.2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.