From 767614bc68c053e4dc3cb6541fc26ed05a5fcdaa Mon Sep 17 00:00:00 2001 From: William Bezuidenhout Date: Tue, 9 Jul 2024 18:21:51 +0200 Subject: [PATCH] chore(redis): set max active redis connections to 1000 (#63718) When active client is 0, there is no limit to the amount of active clients which can lead to Redis quickly reaching it's MaxClient (10000 by default) For more context see [this slack thread](https://sourcegraph.slack.com/archives/C05EMJM2SLR/p1720448507809479) ## Test plan CI ## Changelog * redis-pool: set max active clients to 1000 --- internal/redispool/redispool.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/redispool/redispool.go b/internal/redispool/redispool.go index 4c8ee0197bc..457fcb9b5a8 100644 --- a/internal/redispool/redispool.go +++ b/internal/redispool/redispool.go @@ -81,6 +81,7 @@ func dialRedis(rawEndpoint string) (redis.Conn, error) { var Cache = NewKeyValue(addresses.Cache, &redis.Pool{ MaxIdle: 3, IdleTimeout: 240 * time.Second, + MaxActive: 1000, }) // Store is a redis configured for persisting data. Do not abuse this pool, @@ -90,4 +91,5 @@ var Cache = NewKeyValue(addresses.Cache, &redis.Pool{ var Store = NewKeyValue(addresses.Store, &redis.Pool{ MaxIdle: 10, IdleTimeout: 240 * time.Second, + MaxActive: 1000, })