MongoDB Shard State recovering

Source: Internet
Author: User

MongoDB cluster data query slow, db.collection.find () do not set the condition of the query is almost impossible to find out, by checking the status of each shard server in the cluster, found a machine status of Recoving. View the Db.printreplicationinfo () command to see how the node replicates the data, and discover that it is out of sync with the other nodes.

Workaround: 1, stop the Node MongoDB service (Arbiter node of the MongoDB service also stopped), delete the node data stored in the directory of data, re-open the MongoDB service (first open the Exception node MongoDB service, Then turn on the Arbiter service) the exception node will re-replicate the data to its own node. The status will be changed from the original recovering to Startupp, and the Rs.status () command can see that the uptime is constantly being copied.

When the data synchronization is complete, the STARTUP2 state is automatically secondary.

Workaround 2: Delete the data under the node and copy the full data from the other nodes to that node, and copy the local ....

MongoDB Shard State recovering

Related Article

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.