cloudfoundry / cloudfoundry/cf-java-client

Memory leak by using the client

Aperta
#1,236 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Java
Stelle
334
Fork
319
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando src/main/java/com/sap/cloudfoundry/client/facade/rest/CloudControllerRestClientImpl.java e le classi sotto src/main/java/com/sap/cloudfoundry/client/facade/oauth2. Confronta i conteggi delle classi riportati con Java 11 e Java 17 e le versioni delle dipendenze elencate usando jcmd sotto un carico rappresentativo. Il lavoro è completo quando gli oggetti trattenuti sono stati identificati e si è dimostrato che la crescita della memoria non si verifica più.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.