quantum-elixir / quantum-core

:watch: Cron-like job scheduler for Elixir
https://hexdocs.pm/quantum/
Apache License 2.0
2.3k stars 148 forks source link

Performance issue / holding reference to binaries #519

Closed elvanja closed 1 year ago

elvanja commented 1 year ago

Hi,

A Phoenix app I am working on is experiencing binaries related memory leak. It is related to Quantum triggered jobs, but after some investigation found that it is actually open telemetry related process that holds on to those binaries. Not sure if this is a Quantum or Telemetry issue though (or our usage!).

Binaries memory leak with quantum and (open)telemetry contains all the details.

Any ideas on what might be the cause?

maennchen commented 1 year ago

@elvanja Hm. I would say that this is an unexpected behavior of telemetry / telemetry-related libraries.

Could you open an issue there and link back to this?

elvanja commented 1 year ago

Yep, already done that. See https://github.com/open-telemetry/opentelemetry-erlang/issues/459. Likely it is entirely at telemetry side of things. Apologies for not adding a note sooner 😄

maennchen commented 1 year ago

@elvanja No worries, thank you :)

I'll leave this issue open for other people until it has been resolved.

elvanja commented 1 year ago

Update: this seems to be resolved by switching protocol to :http_protobuf. The :grpc flow still has issues, but at least there is a workaround. And, it definitely is related to open telemetry, not quantum.