1

I have following mongo process tree in LINUX server.

mongod(1168)─┬─{mongod}(1366)
        ├─{mongod}(1367)
        ├─{mongod}(1370)
        ├─{mongod}(1376)
        ├─{mongod}(1378)
        ├─{mongod}(1380)
        ├─{mongod}(1381)
        ├─{mongod}(1382)
        ├─{mongod}(1383)
        ├─{mongod}(1412)
        ├─{mongod}(1413)
        ├─{mongod}(1415)
        ├─{mongod}(1417)
        ├─{mongod}(1418)
        ├─{mongod}(1420)
        ├─{mongod}(1421)
        ├─{mongod}(1422)
        ├─{mongod}(1430)
        ├─{mongod}(1435)
        ├─{mongod}(1605)
        ├─{mongod}(1607)
        ├─{mongod}(1736)
        ├─{mongod}(1737)
        ├─{mongod}(1924)
        └─{mongod}(1925)

I want to kill 1925 process, not parent (1168). Is there any possible ways to kill child processes only & free up the consume memory be zombie/dead processes of mongo.

This mongo processes keeps on increasing & consume CPU 100%.

  • 1
    I think you should try to identify why that child process is consuming CPU. Is there a bad query somewhere? – Anders Bornholm May 2 '18 at 8:29
  • As per the earlier comment, it would be much better to identify what the issue is. If you have a recurring problem, killing or restarting processes is a disruptive (and temporary fix). You can use db.currentOp() to display running processes in the mongo shell and db.killOp() to request the operation terminate. You'd want to use this approach with caution and avoid killing any system threads. Alternatively, you could just restart your mongod service. What are your specific versions of MongoDB and O/S? Also, what sort of deployment do you have (standalone, replica set, sharded cluster)? – Stennie May 4 '18 at 0:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.