3

I am facing this issue consistently, whenever I run some CPU and memory intensive processes so OS kills my mongod service. Due to which service goes into the failed state and everything stops.

Command:

journalctl -u mongod.service

Output:

Jun 01 04:41:18 leadsearch systemd[1]: mongod.service: Main process exited, code=killed, status=6/ABRT
Jun 01 04:41:18 leadsearch systemd[1]: mongod.service: Failed with result 'signal'.

Is there any way to check details why my mongod service is being killed by OS?

Please suggested if there is anyway to fix this issue, or am I doing something wrong?

7
  • It sounds like your system is running out of RAM. Have you checked how much RAM you have available when this happens? – terdon Jun 1 '20 at 15:32
  • This is a long running job, how can i monitor RAM all the time? – Abdul Moiz Jun 1 '20 at 16:19
  • 1
    Well, you can just keep an eye on it and see if it rises just before the service is killed. Alternatively, you can run while :; do date; free; sleep 10s; done > ramlog which will run free every 10 seconds. That should give you an idea of what is happening. Just leave that running and, next time the service dies, kill the while loop and check the ramlog file. That should help. But you already said this happens when you run memory-intensive processes, so it really sounds typical of the OOM killer. – terdon Jun 1 '20 at 16:26
  • What does the mongod log say? – D. SM Jun 2 '20 at 1:56
  • 1
    @AbdulMoiz yes, but that should be a separate question so you can explain exactly what you need. There are various tools designed for this anyway, it would be better to ask a new question. – terdon Jun 2 '20 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.