Skip to content

Instantly share code, notes, and snippets.

@lexaurin
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lexaurin/8897f1be48b9e8747b7d to your computer and use it in GitHub Desktop.
Save lexaurin/8897f1be48b9e8747b7d to your computer and use it in GitHub Desktop.
phpredis "errno=32 Broken pipe" bug
<?php
$redis = new Redis();
var_dump($redis->connect('127.0.0.1'));
for ($i = 0; $i < 3; $i++) {
$pid = pcntl_fork();
if ($pid == 0) { //child
//do something..
break;
} else {
pcntl_wait($status);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment