Skip to content

socket keepalive not working for azure redis cluster #3509

Closed
@ZifanL

Description

@ZifanL

I have a redis cluster hosted by azure. The client side is configured as follows with socket keepalive, but the connections still get closed after being idle for some time.

client = RedisCluster(
    startup_nodes=startup_nodes,
    password=password,
    ssl=ssl,
    decode_responses=True,
    skip_full_coverage_check=True,
    socket_connect_timeout=5,
    socket_timeout=3,
    socket_keepalive=True,
    socket_keepalive_options = {
        socket.TCP_KEEPIDLE: 300,
        socket.TCP_KEEPINTVL: 5,
        socket.TCP_KEEPCNT: 5
    }
)

Does anyone know what could be the possible reason or how to debug this? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions