Skip to content

Regression in v9 due to idle connection behavior change #3575

Description

@bduffany

With go-redis v9, idle connections are now closed lazily, instead of proactively in the background like they were in v8. As a result, we're hitting redis client connection limits that we weren't hitting before, because we now have tons of idle connections (thousands of idle connections for each of our server instances that are connected to redis).

Some questions:

  1. What was the reasoning for this change to close idle conns lazily instead of eagerly?
  2. Is it possible to have ConnMaxIdleTime close the idle conns eagerly instead of lazily? The docs on MaxIdleConns say "The idle connections are not closed by default." but "by default" seems to imply there should be a way to get non-lazy behavior?

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