Memory leak by using the client
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by reviewing src/main/java/com/sap/cloudfoundry/client/facade/rest/CloudControllerRestClientImpl.java and the classes under src/main/java/com/sap/cloudfoundry/client/facade/oauth2. Compare the reported class counts across Java 11 and Java 17 and the listed dependency versions using jcmd under representative load. Done means identifying the retained objects and demonstrating that the memory growth no longer occurs.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- Java
- Stars
- 334
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudfoundry/cf-java-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cloudfoundry/cf-java-client#1374 ·
-
Integration tests fail: test-service-broker.jar incompatible with java-buildpack v5 (JDK 17 default) Open
Difficulty 2/5 Half a day Newbie friendliness 74/100
cloudfoundry/cf-java-client#1344 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
cloudfoundry/cf-java-client#1376 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
cloudfoundry/cf-java-client#1373 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
cloudfoundry/cf-java-client#1370 ·
All issues in cloudfoundry/cf-java-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100