Comments (4)
@s-ludwig : For reference, here's what our server memory usage looked like for the past ~3 months:
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.
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.
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.
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)
- Implement an opt-in performance mode for the Posix process driver HOT 1
- SIGPIPE on send
- Compilation fails on FreeBSD 12.0 HOT 7
- Is EINTR handled on POSIX? HOT 1
- Release v0.8.49 broke dlang's Buildkite CI HOT 2
- What's the validation counter used for?
- code duplication within version block below. HOT 2
- dub produces error on FreeBSD 12.1-RELEASE-p10 HOT 2
- Do not call `AA.remove` from finalizer HOT 4
- android pie compile error HOT 1
- Timer callback resets on every firing and should be rearmed to continue HOT 1
- What EventDrive* should I use to react to WinAPI gui messages? HOT 8
- Use io_uring where sensible HOT 1
- Creating and waiting on timers causes GC allocation every time - expected?
- Issue with installing vibe.d on android for termux HOT 2
- Implement support for DNS resolution via `org.freedesktop.resolve1`
- Building eventcore failing on FreeBSD 13.0-RELEASE
- waitForData is not implemented for Windows
- About io_uring support ;)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eventcore.