Coder Social home page Coder Social logo

Comments (14)

sunl avatar sunl commented on September 7, 2024 1

@marckamerbeek please look at : spring-cloud/spring-cloud-netflix#947

from servo.

brharrington avatar brharrington commented on September 7, 2024

My guess something is just registering a lot of monitors. If you dump the contents of the registry does anything stand out?

from servo.

marckamerbeek avatar marckamerbeek commented on September 7, 2024

Thanks for answering. Yesterday I disabled Servo with -Dspring.metrics.servo.enabled=false. That seems to be working. No memory leak now. This morning I enabled it again in production to see what kind of monitors are registered with /manage/metrics. I made a snapshot and will compare this with the result after a few days. I'll keep you posted.

from servo.

marckamerbeek avatar marckamerbeek commented on September 7, 2024

After one day running on production, the metrics shown in /manage/metrics is not increasing substantially. I got 133 metrices. Memory usage is increasing, so it looks like the memory leak is happening again.

from servo.

marckamerbeek avatar marckamerbeek commented on September 7, 2024

Did some more investigation on the content of the hashmap that is growing. The hashmap is showing 1.2 million instances of AtomicLong:
image

Following this AtomicLong Reference shows each time this trace:
image

So it looks like it has something to do with the use of Netflix Eureka in Zuul.

from servo.

hxs8839 avatar hxs8839 commented on September 7, 2024

I faced a similar issue with Servo on a long duration load test. Heap dumps showed that it primarily had the metrics from List in updateImpl() we were sending via the observer that was long delivered but still in heap. Added a finally block to explicitly nullify the List and other local objects created in the updateImpl method of the observer which seemed to help with those objects getting garbage collected

from servo.

marckamerbeek avatar marckamerbeek commented on September 7, 2024

Thanks @hxs8839 for your comment. I finally removed Netflix Eureka(was planned) and the problem is gone now. I now use the kubernetes dns with loadbalancer to find my services. I don't have the time to investigate the combination Netflix Servo and Netflix Eureka and why its causing problems.

from servo.

brharrington avatar brharrington commented on September 7, 2024

@hxs8839 based on the memory profiles included in this ticket that sounds like a different problem. Feel free to submit a PR if you think it would help.

Looking at NamedConnectionPool in Eureka and the memory profiles above, it looks like something is creating NamedConnectionPool instances and not unregistering.

from servo.

hxs8839 avatar hxs8839 commented on September 7, 2024

@brharrington agreed. Yeah I made the change for my custom observer, Working on if we can generalize it

from servo.

marckamerbeek avatar marckamerbeek commented on September 7, 2024

@brharrington. I'm not in the position right now to spend a lot of time on this. Hopefully somebody else can profit from this. Thanks anyway.

from servo.

yanickxia avatar yanickxia commented on September 7, 2024

i have same problem
image

hashmap has too many key
image

version: com.netflix.servo:servo-core:0.10.1 by SpringBoot Dalston.SR4

from servo.

brharrington avatar brharrington commented on September 7, 2024

See the linked spring ticket (spring-cloud/spring-cloud-netflix#947), it seems like a bug in how spring is registering metrics.

from servo.

yanickxia avatar yanickxia commented on September 7, 2024

@brharrington #947 not a prefect solution, sometime our api-gateway don't konw how many queryparm in url, so the code will be

this.restTemplate.postForEntity(url + "?" + requestVo.getQueryString(), formEntity, String.class).getBody()

RestTemplate has no dynamic queryparm method, if use urlBuilder then question begin again

from servo.

wyzssw avatar wyzssw commented on September 7, 2024

Disable ServoMetrics by add spring.metrics.servo.enabled=false to application.properties。
Servo is the arch-criminal

from servo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.