You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running Redis(v=6.0.10) in the container with official container image using Podman(v.2.5).
And I'm trying to connect Redis server to my Node application with ioredis .
The configuration in my app is like the below:
privatestaticreadonly redisConfig: ioRedis.RedisOptions={connectionName: "Server Application",host: process.env.DB_HOST,port: Number(process.env.REDIS_PORT),password: process.env.REDIS_PASSWORD,retryStrategy: (times)=>{console.log("Redis connection is lost with somehow reason.");console.log("attempt: "+times);if(times>5){returnundefined;}returnMath.min(times*500,2000);},keepAlive:100,};
But it looks like keepAlive doesn't work.
When I tried CLIENT LIST command at redis-cli inside the Redis container:
Thanks for reporting this.
The cause for that issue is most likely nodejs/node#31663
There's another issue here with a reproduction: #1339
I'll close this for now.
I'm running Redis(v=6.0.10) in the container with official container image using Podman(v.2.5).
And I'm trying to connect Redis server to my Node application with
ioredis
.The configuration in my app is like the below:
But it looks like
keepAlive
doesn't work.When I tried
CLIENT LIST
command atredis-cli
inside the Redis container:The first one is the client from my Node application. You can see the port is
54984
.Now, It is the result of
sudo netstat -napo | grep 6379
:You can see that
keepalive
time is set to almost7200 sec
.So I set
tcp-keepalive
, which is Redis configuration var, to"1"
by myself.Now then, ioredis reconnects the client...
Is there something wrong I did in ioredis config?
The text was updated successfully, but these errors were encountered: