Skip to content

Memory leak: Redis clients are not closed #30

Description

@ViktorQvarfordt

My understanding after reading the code of this library is that the Redis clients that are created by the default configuration are never closed.

To mitigate the memory leak, one can use the library like this to take control over the client lifecycle:

const redisUrl = '...'

const publisherRedisClient = createClient({ url: redisUrl })
await publisherRedisClient.connect()

const subscriberRedisClient = createClient({ url: redisUrl })
await subscriberRedisClient.connect()

const resumableStreamContextOpts = {
  waitUntil: null,
  publisher: publisherRedisClient,
  subscriber: subscriberRedisClient,
}

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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