Skip to content

'-ERR max number of clients reached' should be treated as bad connection #2251

Closed as not planned
@dlee-libo

Description

@dlee-libo

When the Redis reaches its max clients, it will send back this error: '-ERR max number of clients reached' and close the connection immediately. So this connection can not be reused anyhow.

Expected Behavior

the connection should be treated as a bad connection and closed.

Current Behavior

the current implementation won't treat the connection as a bad connection and will put it back into the pool. Even though later send command read reply loop will detect the connection is closed(usually through a connection reset by peer error when read reply). But we can detect this earlier actually.

Possible Solution

We can modify the isBadConn function a little bit to detect such an error earlier.

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