Giter Club home page Giter Club logo

Comments (4)

Geod24 avatar Geod24 commented on August 15, 2024 1

@s-ludwig : For reference, here's what our server memory usage looked like for the past ~3 months:
Screen Shot 2021-03-31 at 9 32 54

We have two instances of our app running per server, and the OOM killer would play Russian roulette with them on a daily basis. The less-steep curve at the beginning was just because there was little to no load on the app. We deployed the fix in #179 yesterday.

from eventcore.

s-ludwig avatar s-ludwig commented on August 15, 2024

In our case this was a Timer dtor triggered by a GC cycle which was triggered by an allocation in one of our module ctors.

This sounds like an issue that needs to be fixed. Since unfortunately the GC ignores thread-safety when calling finalizers, it is a programming error to let the GC reap vibe.d objects. They need to be disposed explicitly from their owner thread before the last reference disappears.

There is some mitigation logic in vibe/core/internal/release.d, but it seems like that didn't work here for some reason.

from eventcore.

s-ludwig avatar s-ludwig commented on August 15, 2024

Looking at the code, scratch that, releaseHandle itself calls eventDriver, so that was probably the issue. It would be nice to change that to use some pure getter version of eventDriver in order to avoid creating unused event driver instances in utility threads, though.

from eventcore.

s-ludwig avatar s-ludwig commented on August 15, 2024

For reference, here's what our server memory usage looked like for the past ~3 months:

Definitely a great catch. I wonder whether the dub registry is affected by this, too.

I've also added tryGetEventDriver in #182 so that vibe-core can avoid creating unnecessary driver instances.

from eventcore.

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.