Skip to content

Memory leak in 5.0.1 #182

@key88sf

Description

@key88sf

We are using a Datadog::Statsd object in a sidekiq worker. When the worker executes, we basically do this:

statsd = Datadog::Statsd.new("localhost", 8125)
statsd.increment(....) # specific params not included here

When upgrading from 4.8.3 to 5.0.1, we are seeing memory usage on the instance start to climb linearly until it finally exhausts all memory and we get a ThreadError: can't create Thread: Resource temporarily unavailable. We have definitively pinpointed this problem to the 5.0.1 upgrade --- there were no other changes made other than upgrading just the dogstatsd-ruby gem.

You can see the mem usage problem in the graph below:
Screen Shot 2021-04-21 at 5 36 50 PM
(each little dip is a deploy where we changed just one gem version. The last one is where we upgraded dogstatsd-ruby from 4.8.3 to 5.0.1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions