MongoDB has a high CPU, how to force stop the operation that is being performed

Source: Internet
Author: User
Tags mongodb mongodb server

If a long-consuming task is issued to the MONGODB server, the client-forced termination causes the task to continue executing on the server side.

MongoDB now provides a way to query and manage the tasks that are being performed.

Db.currentop ()   obtains all current ' in progressing ' operations, including Insert/query/update/remove/getmore/command, etc. > Db.currentop ( True

The data structure returned is as follows:

{"InProg": [{"opid": ID of 3434473,//Operation Activ E ": <boolean>,//is Active" secs_running ": How many seconds did the 0,//operation Run" OP ":" &l T;operation> ",//specific operating behavior, including (Insert/query/update/remove/getmore/command)" ns ":" <database&gt ;.                          <collection> ",///operation of the namespace, such as: Database name. Collection name" Query ": {//specific action statement}, "Client": "

 

Find an operation that takes a long time to secs_running, which can be an unusual operation,> db. Killop(opid)

MongoDB has a high CPU, how to force stop the operation that is being performed

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.