Skip to main content

Out of Memory errors

Comments

5 comments

  • cPanelMichael
    Hello, Check to see if the following post helps: Thank you.
    0
  • brianc
    It does not. The server was running fine at the time of these OOM warnings. Also there was plenty of memory left. So I am confused. How does one get an OOM warning when 9+ GB of memory unused? This is what the messages log says: Mar 5 06:34:58 host2 kernel: Out of memory: Kill process 11585 (clamd) score 40 or sacrifice child Mar 5 06:35:01 host2 kernel: [] out_of_memory+0x4b6/0x4f0 Mar 5 06:35:01 host2 kernel: Out of memory: Kill process 10338 (mysqld) score 35 or sacrifice child Mar 5 06:35:01 host2 kernel: [] out_of_memory+0x4b6/0x4f0 Mar 5 06:35:01 host2 kernel: Out of memory: Kill process 11414 (java) score 34 or sacrifice child Mar 5 06:35:01 host2 kernel: [] out_of_memory+0x4b6/0x4f0 Mar 5 06:35:01 host2 kernel: Out of memory: Kill process 11431 (java) score 34 or sacrifice child Are these not cPanel processes?
    0
  • 24x7server
    It does not. The server was running fine at the time of these OOM warnings. Also there was plenty of memory left. So I am confused. How does one get an OOM warning when 9+ GB of memory unused?

    What I suspect it is that this may be related to the SWAP. Did you check what was the swap space left when this incident occur.. What is the swap value? Execute the below command to check for it. # cat /proc/sys/vm/swappiness -> Swap space value. # free -m -> memory and swap usage..
    0
  • brianc
    cat /proc/sys/vm/swappiness = 30 free -m = total used free shared buff/cache available Mem: 11854 2551 697 329 8605 8553 Swap: 511 398 113 The swap size configured for the server is 512mb. Too low?
    0
  • cPanelMichael
    Since these OOM alerts come from cPanel's processes, I changed the "Max cPanel process memory" setting in Tweak settings to unlimited. It does not have any effect. What am I missing here?

    Hello Brian, Keep in mind the OOM killer is not a feature of cPanel & WHM, and is unrelated to the "Max cPanel process memory" setting you referenced. cPanel simply sends the notification to let you know your system's OOM killer was invoked because the "System Out of Memory" notification type is enabled in "WHM >> Contact Manager". The following document is useful for understanding how the OOM Killer works: How to diagnose causes of oom-killer killing processes If you're using CentOS 7, information about the killed process is logged via journalctl. EX: journalctl -r | grep memory
    Thank you.
    0

Please sign in to leave a comment.