Coder Social home page Coder Social logo

Memory leak problem about ex_rated HOT 12 CLOSED

dsnipe avatar dsnipe commented on May 16, 2024 2
Memory leak problem

from ex_rated.

Comments (12)

grempe avatar grempe commented on May 16, 2024 1

I'll mark this as help wanted as I don't currently have the time to investigate. I suspect there is an edge case at play here though as this lib has been used by others in production for a couple of years now with no similar reports.

@dsnipe Can you provide more information as to how you determined that it was this lib that was seemingly at fault for your server memory issue?

There is an automatic pruning process for old ETS records which should limit the growth of the ETS tables with old buckets.

from ex_rated.

grempe avatar grempe commented on May 16, 2024

from ex_rated.

sergiotapia avatar sergiotapia commented on May 16, 2024

@dsnipe This uses ETS for saving bucket information - could it be you're never purging stale bucket data?

from ex_rated.

ryanwinchester avatar ryanwinchester commented on May 16, 2024

@dsnipe did you ever solve this? I wanted to use this in a production application as well, but now I'm scared to.

from ex_rated.

sergiotapia avatar sergiotapia commented on May 16, 2024

@grempe There's also the issue where adding ex_rated to a Phoenix project essentially turns the application single-threaded since every request goes through the exrated genserver. It becomes a bottleneck.

from ex_rated.

jaimeiniesta avatar jaimeiniesta commented on May 16, 2024

@sergiotapia can you please elaborate further in a separate issue? If if makes every request pass through the exrated bottleneck, then that's serious.

from ex_rated.

ryanwinchester avatar ryanwinchester commented on May 16, 2024

https://dockyard.com/blog/2017/05/19/optimizing-elixir-and-phoenix-with-ets

from ex_rated.

sergiotapia avatar sergiotapia commented on May 16, 2024

@jaimeiniesta It makes every single request go through the single genserver process. It is really bad. I didn't notice this issue but Chris McCord mentioned it to me and said it was a major problem; turning Phoenix apps into a single-threaded app.

He then pointed me to this article: https://dockyard.com/blog/2017/05/19/optimizing-elixir-and-phoenix-with-ets

from ex_rated.

jaimeiniesta avatar jaimeiniesta commented on May 16, 2024

But, you mean every single request that uses ExRated, right? Or every single request? It's bad in both cases, but not as bad in the first case.

from ex_rated.

dsnipe avatar dsnipe commented on May 16, 2024

It turned out that ex_rated wasn't a problem. I can close the issue.

from ex_rated.

dsnipe avatar dsnipe commented on May 16, 2024

Thank you everyone and sorry for a false alarm.

from ex_rated.

sergiotapia avatar sergiotapia commented on May 16, 2024

@jaimeiniesta Yes, every single request that uses exrated.

from ex_rated.

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.