Join GitHub today
Memory leak when monitoring is disabled (reproducible, steps are known) #228
We discovered a serious bug which is almost failed our production setup by consuming all available memory, mostly by the background worker (DelayedJob) processes.
After some time in heap dump analyzing I found out that there are too many old objects like
A fast code review and further process memory analyzis revealed that
As I understand, this line explicitly specifies that
Please, contact me if you'll need additional information.
I believe what's happening is that we treat the Sidekiq (and resque, and so on) instruments differently than library (ActiveRecord, HTTP, etc) instruments.
You pointed to the exact line that looks wrong. The library instruments are behind that check of
So what's happening is that a bit too much is installed, and the sidekiq instruments are capturing some data, but since the rest of the agent is (correctly) not started, that data never moves forward and out from through normal means, so it slowly grows over the course of several days.
I'll have a new version out to you in a bit that will prevent Sidekiq from being instrumented at all when
Thank you for the excellent report, we'll have it fixed right away.