cloudfoundry / cloudfoundry/cf-java-client

Memory leak by using the client

オープン
#1,236 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
334
フォーク
319
PR マージ指標
30日以内にマージされた PR はありません

説明

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!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、src/main/java/com/sap/cloudfoundry/client/facade/rest/CloudControllerRestClientImpl.java と src/main/java/com/sap/cloudfoundry/client/facade/oauth2 配下のクラスを確認します。Java 11 と Java 17 で報告されたクラス数、および記載された依存関係のバージョンを、代表的な負荷の下で jcmd を使用して比較します。保持されているオブジェクトを特定し、メモリの増加が発生しなくなったことを実証できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api, backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。