Skip to content

Memory leak in redisson instrumentationΒ #9952

@otbe

Description

@otbe

Describe the bug

Hi,

for some reason or another we see very high memory consumption when using the otel java agent + redisson.
We use a combination of grpc and redisson. When our app starts sometimes it consumes many messages and does something like this:

for(Message message : messages) {
  final var tx =  joinRedissonTransaction();
  final var map = tx.getMap("foo");
  map.put(message.getSomething(), message.getBar());
}

What happens with a basic otel java agent instrumentation, it goes OOM after a while,
Screenshot 2023-11-25 at 21 30 14

However when disabling the redisson instrumentation it seems to work almost perfect
Screenshot 2023-11-25 at 21 32 26
(the blue dotted line indicates a new deployments). Its the same software version, just configured differently in regards to the otel agent.

In this special service we consume a lot of grpc messages on startup and talk a lot to redis.

It looks like something inside the otel agent keeps references to objects which then never can be GCed. The same app needs almost 12GB memory to finally survive with the regular otel java agent.

Steps to reproduce

Not yet ready, but im ready to try different things. Just let me know what to do :)

Expected behavior

No additional memory consumption :)

Actual behavior

It just dies after a while.

Javaagent or library instrumentation version

1.31.0

Environment

JDK: corretto 17
OS: debian
SB: 3.1
redisson: 3.24.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions