Skip to content

#5876 broken pipe handling #6356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

#5876 broken pipe handling #6356

wants to merge 2 commits into from

Conversation

melfa
Copy link

@melfa melfa commented Dec 2, 2014

    # how to reproduce bug
    # first set up redis timeout to 5 seconds in /etc/redis/redis.conf as described in http://redis.io/topics/clients
    $redisConfig = [
        'hostname' => 'localhost',
        'port' => 6379,
        'connectionTimeout' => 5,
    ];
    $redis = new \yii\redis\Connection($redisConfig);
    $redis->executeCommand('PING');

    sleep(20);

    try {
        // this is will cause yii\db\Exception in Connection::parseResponse since Redis dropped connection
        $redis->executeCommand('PING');
    }
    catch (\Exception $e) {
        // now Connection::close will try to send QUIT command but got yii\base\ErrorException
        // in Connection::executeCommand on fwrite
        // So we can't send any command and can't close connection
        $redis->close();
    }

@cebe cebe self-assigned this Dec 2, 2014
@samdark samdark added this to the 2.0.2 milestone Dec 2, 2014
@cebe cebe modified the milestones: 2.0.3, 2.0.2 Jan 7, 2015
@cebe cebe modified the milestones: 2.0.4, 2.0.3 Feb 28, 2015
@cebe cebe modified the milestones: 2.0.4, 2.0.5 May 9, 2015
@cebe cebe modified the milestones: 2.0.7, 2.0.6 Jul 25, 2015
@cebe cebe removed this from the 2.0.7 milestone Feb 6, 2016
@cebe
Copy link
Member

cebe commented Feb 6, 2016

pull request needs to be merged into redis extension. Added a note to the issue: yiisoft/yii2-redis#57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants