Memory in Docker is not released with eclipse-temurin:17-jre image

94 Views Asked by At

We recently transitioned our application from Java 11 to Java 17. Following the DEPRECATION NOTICE in the OpenJDK Docker repository OpenJDK, we opted for eclipse-temurin and chose the eclipse-temurin:17-jre as the base image for containerizing our application.

The output of the kubectl describe command for the specific service is as follows:

Containers:
  dossiers:
    Container ID:   containerd://5c963bd1747b5b1447fcf1e7024793dfa608587eb6794d579ac74f73c44c0146
    Image:          eu.gcr.io/test-gcr/dossiers:master-tag
    Image ID:       eu.gcr.io/test-gcr/dossiers@sha256:hash
    Port:           8085/TCP
    Host Port:      0/TCP
    State:          Running
    Started:        Wed, 31 Jan 2024 03:25:41 +0530
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     1
      memory:  1200M
    Requests:
      cpu:      50m
      memory:   900M
    Liveness:   http-get http://:http/management/health delay=600s timeout=1s period=20s #success=1 #failure=3
    Readiness:  http-get http://:http/management/health delay=30s timeout=1s period=5s #success=1 #failure=6
    Environment:
      NBX_KEYCLOAK_INTERNAL_URL:  http://keycloak-http:8180/auth
      TZ:                         Europe/Amsterdam
      NBX_MONGO_URI:              <set to the key 'uri' in secret 'mongo-db-credentials'>  Optional: false
      NBX_ENVIRONMENT:            tst
      JAVA_MEM_OPTS:              -XshowSettings:vm -XX:+UseG1GC -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=197753K -XX:ReservedCodeCacheSize=240M -Xmx549766K
      SPRING_PROFILES_ACTIVE:     gcp,swagger
      TEMPORARYFILES_BASEPATH:    /temporaryfiles/
    Mounts:
      /temporaryfiles/ from temporaryfiles-volume (rw)
      /var/run/secrets/kubernetes.io/acctest(ro)

GCP Monitoring

We attempted to substitute the Docker base image with ibm-semeru-runtimes:open-17.0.9_9-jre, and it is functioning properly. However, due to other issues with OpenJ9, we are currently adhering to the use of eclipse-temurin:17-jre and finding the solution to free up the allocated memory.

Kindly advise if anyone has a solution to free up the allocated memory. Thanks

0

There are 0 best solutions below