Skip to content

Memory leak in the default RedisIntegration #14192

@EDjur

Description

@EDjur

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.36.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

import * as Sentry from '@sentry/node';

...

Sentry.init({
            dsn,
            environment,
            release,
            tracesSampleRate: 1.0,
            maxValueLength: 400,
            profilesSampleRate
});

Steps to Reproduce

Basically we just set up Sentry with our Fastify server that also has a redis component. It seems that the RedisIntegration (which is enabled by default), causes a memory leak somewhere.

I don't know enough about Sentry internals to dig much deeper I'm afraid. All I know is the memory leak stops when I disable the RedisIntegration.

Do let me know if there's any additional details I can try dig up for you.

Expected Result

No memory leaks.

Actual Result

The graph summarizes the problem pretty well. This is pod memory usage.

Orange: Without RedisIntegration
Blue: With RedisIntegration
Image

Metadata

Metadata

Assignees

Labels

BugIntegration: redisIssues related to Redis support for the Sentry Node SDKPackage: nodeIssues related to the Sentry Node SDKStale

Projects

Status

Waiting for: Community

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions