cloudfoundry / cloudfoundry/cf-java-client

Memory leak by using the client

Abierto
#1,236 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Java
Estrellas
334
Forks
319
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hello, our service used this client for a long time and we didn't have any problems. We were using Java 11 but recently we migrated to Java 17. With that our problems started. Under a lot of load our services keeps crashing due to full memory. While I was doing investigation, I ssh-ed to the service and using jcmd i saw what was going on in the memory. These are classes that are loaded and not cleaned afterwards which lead to the memory leak. The number is the count of classes that are loaded. These results were taken when the service wasn't under a lot of load. During it's peak they become even higher.

761809 io.micrometer.core.instrument.ImmutableTag
409768 io.micrometer.core.instrument.Meter$Id
202341 io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueue
86861 io.micrometer.core.instrument.distribution.DistributionStatisticConfig
86857 reactor.netty.channel.MeterKey
86958. [Lio.micrometer.core.instrument.Tag;
52797 io.micrometer.core.instrument.composite.CompositeTimer
86958 io.micrometer.core.instrument.Tags

We are using 5.12.2.RELEASE. We tried also 5.12.1.RELEASE but nothing changed. I also tried to change the reactor-netty version. I tried with 1.1.21 and also 1.0.*. The result is still the same. Also tried swithing the mecrometer version but the result is the same.

Here is a link for our cf client wrapper that we are using. Here are some calls that we are using: link

Also here are classes that we are using to fetch tokens: link

Do you know where the problem could be. Thanks in advance!

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza revisando src/main/java/com/sap/cloudfoundry/client/facade/rest/CloudControllerRestClientImpl.java y las clases bajo src/main/java/com/sap/cloudfoundry/client/facade/oauth2. Compara los recuentos de clases reportados en Java 11 y Java 17 y las versiones de dependencias indicadas usando jcmd bajo una carga representativa. Se considera terminado cuando se hayan identificado los objetos retenidos y se haya demostrado que el crecimiento de memoria ya no se produce.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
api, backend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.