** connection pool **
client := redis.NewClient(&redis.Options{
Addr: "Amazon ElastiCache for Redis ",
Password: "", // no password set
DB: 0, // use default DB
IdleCheckFrequency: 15*time.Second,
IdleTimeout:60*time.Second,
MinIdleConns: 15,
MaxConnAge: 60*time.Second,
})
var RedisCtx = context.Background()
_, err:=client.Exists(RedisCtx,key).Result()
if err!=nil{
//Random reminder connection pool timeout. why?
logs.Warning("exists redis error",err)
}
The connection pool will occasionally appear in use “connection pool timeout”
redis use "Amazon ElastiCache for Redis "
thanks!!