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 use redis_connect(ip, port) to connect the Redis server(long time connection), then it works well, but about 10 minutes later,the connection is closed(active or passive, I don't know)
First of all you should make sure that the timeout value is set to 0 on your Redis server (see redis.conf) or it will drop any client idling for more than the specified value (not-so-old versions of Redis had a default timeout of 300 seconds AFAIR, now the default is 0).
On the client end you must create the connection by setting the timeout parameter to 0 like in the following snippet to prevent the socket from being closed for a timeout when there's no activity:
I use
redis_connect(ip, port)
to connect the Redis server(long time connection), then it works well, but about 10 minutes later,the connection is closed(active or passive, I don't know)And all the successive command are failed. I have browsed the out put of
CLIENT LIST
, and not list my client's IP, why this happened?The text was updated successfully, but these errors were encountered: