Find the oldest idle clients

Find long-lived or idle connections that leak sockets, sorted by age

redis-cli CLIENT LIST | tr ' ' '\n' | grep -E 'addr=|age=|idle=' | paste - - - | sort -t= -k3 -rn | head

tool
redis32 commands
tags
redisnetworktroubleshootingdebug

More redis commands

  • redis-cli --cluster check <host>:<port>

    Check slot coverage, node consistency and open slots across the cluster

  • redis-cli -h redis -p 6379 -a <password>

    Open an interactive redis-cli session

  • redis-cli -h redis INFO all

    Full server info: memory, CPU, clients, persistence

  • redis-cli -h redis MONITOR

    Stream every command the Redis server runs, it slows Redis down, so don't leave it on in production

  • redis-cli -h redis SLOWLOG GET 20

    Show the last 20 slow commands with execution time

all 32 redis commands