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:
- What was the reasoning for this change to close idle conns lazily instead of eagerly?
- 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?