-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
We have EOF
issues with v2
with idle connections. Our redis server is configured with timeout
, when connections are idle for longer, we get an EOF
error on the next request. We tried to lower/set the IdleTimeout
option, but it causes a deadlock.
How to reproduce:
- Start redis-server with
--timeout 5
go run
the code snippets below
package main
import (
"fmt"
redis "github.com/vmihailenco/redis/v2"
"time"
)
func main() {
red := redis.NewTCPClient(&redis.Options{Addr: "localhost:6379"})
for {
val := red.Ping()
fmt.Println(val)
time.Sleep(6 * time.Second)
}
}
package main
import (
"fmt"
redis "github.com/vmihailenco/redis/v2"
"time"
)
func main() {
red := redis.NewTCPClient(&redis.Options{Addr: "localhost:6379", IdleTimeout: 3})
for {
val := red.Ping()
fmt.Println(val)
time.Sleep(6 * time.Second)
}
}
Metadata
Metadata
Assignees
Labels
No labels