You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
When running this code, my application runs out of memory very quickly, and the offending process is oc_reporter. I was able to replicate this locally and watch the memory usage with Observer. The memory usage is mainly binary:
I thought maybe that I am sending too much data, but after poking around in Observer I don't see the ETS tables growing unbounded or queues sizes increasing, so I don't think that is the cause. When running locally I had a Collector setup that was just writing to file. In production our Collector publishes to Kafka.
I also tried forcing some garbage collections and hibernating to see if there was any memory I could record that way, but that didn't help at all either.
I am now stuck and don't really know where to go from here:
Either I am using this library incorrectly, or
There is a memory leak somewhere that occurs under heavy usage caused by some piece slowing down.
The text was updated successfully, but these errors were encountered:
Hm, I'm surprised it isn't helped by manually running garbage collection since it is a binary leak.
Another hack you could try is to kill the reporter and see if the garbage is cleaned up.
If you are only using tracing then my suggestion would be to move to OpenTelemetry https://github.com/open-telemetry/opentelemetry-erlang -- I reworked how the reporter works in such a way that garbage should be less likely to accumulate because a new process is used for each report run and then discarded.
But note, there are 2 PRs that will change how it works, we are nearing GA and will stop breaking the API soon, but they don't change how the Elixir with_span macro works which I think you would want to use as they are essentially the same as the function you wrote to wrap OpenCensus.
If an issue with changing is that you already have the OpenCensus collector in use in your environment so can't simply change to the OpenTelemetry collector then I can get a version of the Erlang OC reporter ported over to OpenTelemetry.
I have an Elixir project where I am using
opencensus-erlang
for the first time. I have a helper function for wrapping pieces of my code in spans:To talk to my collector I am using the opencensus_service library.
In my application code, I have a layout that is something like this, with a parent span that has some children (which may have children themselves):
When running this code, my application runs out of memory very quickly, and the offending process is
oc_reporter
. I was able to replicate this locally and watch the memory usage with Observer. The memory usage is mainlybinary
:I thought maybe that I am sending too much data, but after poking around in Observer I don't see the ETS tables growing unbounded or queues sizes increasing, so I don't think that is the cause. When running locally I had a Collector setup that was just writing to file. In production our Collector publishes to Kafka.
I also tried forcing some garbage collections and hibernating to see if there was any memory I could record that way, but that didn't help at all either.
I am now stuck and don't really know where to go from here:
The text was updated successfully, but these errors were encountered: