GCP calls OOMKiller for java app however it doesn t consume max allowed memory

0 votes
Input: GCP, Kubernetes, java 11 spring boot 2 application

Container is started with memory limit 1.6GB. Java application is limiting memory as well -XX:MaxRAMPercentage=80.0. Under a "heavy" (not really) load - about 1 http request per 100 ms during about 4 hours application is killed by OOMKiller. Internal diagnostic tools is showing that memory is far from limit: POD contains only java app (+jaeger agent). The odd thing that after restart GCP shows almost maximum memory usage instead of slowly growing if it was memory leak.
Apr 6 in GCP by Rahul
• 3,380 points
64 views

1 answer to this question.

0 votes

As per the log file there are more than 10,000 started threads. This is a lot considering that there are 2CPU/core for each container. Each thread and its stack is allocated in memory separate from the heap. It is quite possible that the large number of started threads is the cause for the OOM problem.

The JVM is started with Native Memory Tracking related options

(-XX:NativeMemoryTracking=detail, -XX:+UnlockDiagnosticVMOptions, -XX:+PrintNMTStatistics)

that could help to see the memory usage include what's consumed by those threads. I would highly recommend to not have that many threads.

answered Apr 6 by Korak
• 5,820 points

Related Questions In GCP

0 votes
1 answer

Default session timeout for a java app engine

Default session timeout is set to 30 ...READ MORE

answered Sep 25, 2019 in GCP by Sirajul
• 59,170 points
912 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Creating password for a windows instance on GCP

Windows Server instances use password authentication instead ...READ MORE

answered Sep 24, 2019 in GCP by Sirajul
• 59,170 points
2,317 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Is it possible to rename a project in GCP?

Yes, it is possible to rename your ...READ MORE

answered Sep 27, 2019 in GCP by Sirajul
• 59,170 points
12,290 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP