stale connections are not being closed even after they exceed the IdleTimeout period #3112
prateeeka-nadimpalli
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i have my redis client configuration as below
when iam taking the redis connection statistics of my app, i observed that the stale connections keeps on increasing . It started with 10 and keep on increasing to 7000. I am taking these these stats for every minute.
Since i kept the IdleTimeout for 2 minutes, shouldn't these connections be closed after that and my count be 0. Bt i couldn't see any stale connections decreasing but keeps on increasing.
Below is the code iam using to print these stats:
stats := redisClient.PoolStats()
logString := fmt.Sprintf("Time: %s, Total Conns: %d, Idle Conns: %d, Stale Conns: %d, Hits: %d, Misses: %d, Timeout: %d\n", time.Now().Format(time.RFC3339), stats.TotalConns, stats.IdleConns, stats.StaleConns, stats.Hits, stats.Misses, stats.Timeouts)
Beta Was this translation helpful? Give feedback.
All reactions