Skip to content

Non-socket way to set client timeout to a very small value #905

Open

Description

@antirez

Sometimes you have a bug in your client software that leaks Redis connections.

The result is that the server is full of idle connections and there is no easy way to connect with the server to operate on it, as the new connections will be discarded because the max number of clients is reached.

We should investigate if setting the timeout to 1 is a viable way to connect with the server more easily using redis-cli. However setting the timeout to 1 will not be possible using CONFIG SET timeout so an alternative system should be available, like an UDP port receiving very urgent to process commands, or a signal like SIGUSR2 that sets the timeout to 1.

More design is needed.

Activity

  1. ghost assigned on Jan 23, 2013
  2. vsespb commented on Sep 20, 2014

    @vsespb

    proposal:

    When client connects, and max num of connections reached, first executed command returns error: ERR max number of clients reached

    So.. create a new command EXTRACONNECT.
    Allow total maxclients+N connections, but after maxclients is reached, new connections are usable only when first executed command is EXTRACONNECT

    And add a special flag to redis-cli so it execute this command after connection.

  3. removed this from the milestone on May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions