Questions tagged [go-redis]

59 questions
1
vote
1 answer

dial tcp :6379: connect: connection refused

I'm building an application on GKE (Google Kubernetes Engine) and a system using GCE instances of Redis. When I try to connect from the application pod on GKE to Redis on GCE, I get connection refused.(dial tcp :6379: connect: connection…
lulu_39
  • 43
  • 8
1
vote
1 answer

Redis distributed lock does not take effect

I am using go-redis distributed lock to realize mutual exclusion access, my server is a single thread server. But at the same time, many requests get the distributed lock. func (redisMgrPtr *RedisMgr) getLock(key string) (int32) { encodeKey :=…
Yongqi Z
  • 605
  • 8
  • 20
1
vote
1 answer

Error cannot find package "github.com/go-redis/redis/v8" when downloading go-redis package

I tried to download go-redis using this command go get github.com/go-redis/redis/v8 but I got this following error : cannot find package "github.com/go-redis/redis/v8" in any of: C:\Go\src\github.com\go-redis\redis\v8 (from $GOROOT) …
Pajri Aprilio
  • 322
  • 5
  • 16
1
vote
1 answer

Unsubscribe from Redis doesn't seem to work

I am trying to use pub-sub in Redis. What I do is I open two redis-cli. The first one I issue the command flushall to make sure to start green. Then in the other terminal I open the MONITOR to print all commands from my Golang sample client (code…
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
1
vote
1 answer

How to run non transaction pipeline from a client.Watch function in go-redis

I have a scenario similar to the following : txf := func(tx *redis.Tx) error { // Phase 1: // read some stuff by several get/hget request which I want to send with pipeline // to avoid unnecessarily rounds to the redis server // Phase…
Avner Levy
  • 6,601
  • 9
  • 53
  • 92
0
votes
1 answer

IAM auth using go-redis

Currently, I am using go-redis package to interface with AWS elasticache for Redis. I am authenticating into the redis instance like so, import "github.com/go-redis/redis" func pingRedis() { cli := redis.NewClient(redis.Options{ Addr: …
0
votes
0 answers

ERR unknown command '--cluster' when rebalancing slots

I have created a RedisClient using go-redis rdClient := rd.NewClusterClient(rdClusterOpts) I can do other database operation using the client out,err := rdClient.Ping(context.TODO()).Result() PONG I can also do get set operation using the…
Shaad7
  • 51
  • 3
0
votes
1 answer

go-redis does it have support for registering / executing lua functions

From its version 7.x onwards, Redis has introduced functions, as an alternative to script execution, as documented here. I am looking for an example, or documentation on how to use redis functions using go-redis package. Not sure, if go-redis…
Mopparthy Ravindranath
  • 3,014
  • 6
  • 41
  • 78
0
votes
1 answer

Redis stream XReadGroup not reading new messages even if `BLOCK` parameter is 0

I am using redis stream and XReadGroup for reading messages from stream. I have set block parameter as 0. currently my code look like this data, err := w.rdb.XReadGroup(ctx, &redis.XReadGroupArgs{ Group: w.opts.group, …
0
votes
4 answers

golang redis client connection status

After creting a new Redis client, is there a way to check the status of the connection? As a way to ensure that the Sentinel is in a healthy state, a status check after instantiation would be ideal.
TruBlu
  • 441
  • 1
  • 4
  • 15
0
votes
1 answer

Redis taking too much time to execute simple commands during concurrent access

Background of problem Hello all , i have made a project in golang gin , and I have integrated the redis Clusterclient in it using "github.com/go-redis/redis/v7" P.S. Redis that I am using is a redis cluster hosted on AWS the redis commands that I am…
iron_man83
  • 67
  • 2
  • 9
0
votes
1 answer

eko gocache for redis :: store.RedisStore does not implement store.StoreInterface

I am using this library https://github.com/eko/gocache for redis with go lang My code is package main import ( "context" "fmt" "time" "github.com/eko/gocache/cache" "github.com/eko/gocache/store" "github.com/go-redis/redis/v8" ) func main() { ctx…
chetanspeed511987
  • 1,995
  • 2
  • 22
  • 34
0
votes
0 answers

Redis client count with pipelines

I have just done an update to a GO application using pipeline, I noticed in my redis monitoring app that the number of clients connected just skyrocketed from 1/2 to 300+ I can't seem to find information on if this is normal for pipelines, they are…
Matthew Harris
  • 51
  • 3
  • 10
0
votes
1 answer

redis scan returns not all values. (go-redis)

Redis SCAN command with small COUNT for large keys, not all keys always returned. 10000 keys, 1000 COUNT = return all keys. 10000 keys, 10 COUNT = return not all keys. I want to get all keys for so many keys(100 million), without using commands…
0
votes
1 answer

go-redis/v8 connection pool timeout

** 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, …