0

From last night I am getting below unexpected behaviour.

Out of memory: Kill process 1740 (java) score 128 or sacrifice child

Apr  8 19:14:20 ubuntu-s-4vcpu-8gb-sgp1-01 kernel: [17644.393549] Out of memory: Kill process 1740 (java) score 128 or sacrifice child
Apr  8 19:14:20 ubuntu-s-4vcpu-8gb-sgp1-01 kernel: [17644.395444] Killed process 1740 (java) total-vm:5739256kB, anon-rss:1083164kB, file-rss:0kB, shmem-rss:0kB
Apr  8 19:14:20 ubuntu-s-4vcpu-8gb-sgp1-01 kernel: [17644.472817] oom_reaper: reaped process 1740 (java), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Apr  8 19:17:01 ubuntu-s-4vcpu-8gb-sgp1-01 CRON[6201]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

I know this is OOM problem. But in high traffic time my memory usages is 39%. I also using this setup for the last 6 month.

My server setup is as follows:

  1. One tomcat server
  2. One JBOSS server
  3. Jenkins
  4. Mysql server

Machine configuration is : Ubuntu 4vcpu 8GB RAM

Current machine status is in attachment.

Please suggest me some procedure that can help.

Notes :

  1. I checked all public porst. All are ok
  2. My servers are configured properly
  3. Database is configured properly
  4. I am fetching this issue from last night. I have used this setup for six months. It occurred suddenly
  5. I checked suspected installed package using Rkhunter. They detected no problem

enter image description here]1

4
  • Java eats 6G on 8G with one processus before be killed. The other one shoud takes the last 2G. If it takes usually 400M, there IS a problem of memory in your java app...
    – Dom
    Apr 8, 2020 at 17:45
  • @Dom sir, I checked the memory status before shutdown. It was using only 13% of memory and it was height memory consumer. Apr 8, 2020 at 17:50
  • You assert your servers are configured correctly. You should revisit that assertion. His much swap do you have and what is VM.swappiness set to?
    – davidgo
    Apr 8, 2020 at 22:36
  • 2
    Looking at your screenshot I bet you don't have any swap. If I'm right, I bet that is your problem - Linux is not designed to run without swap. If you don't want OOM errors but don't want the performance hit of swap, enable swap and set VM.swappiness to 0. Your server will only swap slightly and as a last resort, but it will help give feedback to the memoryanagement algorythms to prevent OOM errors.
    – davidgo
    Apr 8, 2020 at 22:39

0

You must log in to answer this question.

Browse other questions tagged .