title: Docker Redis throws 'read error on connection'
body: <p>I've been using Redis on a docker image for a short while (a week or so), installed through plesk with success. We've decided to upgrade the hardware of the VPS server and after the reboot the docker Redis throws "read error on connection" when trying to do anything other than connecting.</p>
  
  <p>I've tried setting PHP's default_socket_timeout</p>
  
  <pre><code>ini_set('default_socket_timeout', -1);
  </code></pre>
  
  <p>and the redis timeout:</p>
  
  <pre><code>$clientRedis-&gt;setOption(Redis::OPT_READ_TIMEOUT, -1);
  </code></pre>
  
  <p>But still the error remains..
  Here's my code I use for testing:</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors', 1);
  ini_set('default_socket_timeout', -1);
  
  $clientRedis = new Redis();
  
  function Redis_connect($hostname, $port){
      $start = time();
      global $clientRedis;
      try {
  
          $connected = $clientRedis-&gt;connect($hostname, $port);
  
          $clientRedis-&gt;setOption(Redis::OPT_READ_TIMEOUT, -1);
          if (!$connected) { throw new Exception(); }
      } catch (Exception $e) {
          $elapsed = time() - $start;
          echo "Elapsed: " . $elapsed . "\n";
          die($e-&gt;getMessage());
      }
  
  
  }
  
  //Connecting to Redis server on localhost
  echo Redis_connect("127.0.0.1", 6379);
  
  
  echo "Connected to server successfully";
  echo "";
  echo "Server is running: " . $clientRedis-&gt;ping();
  echo "";
  
  
  ?&gt;
  </code></pre>
  
  <p>This outputs:</p>
  
  <pre><code>Connected to server successfully
  Fatal error: Uncaught RedisException: read error on connection in [..]/redis.php:32 Stack trace: #0 [..]/redis.php(32): Redis-&gt;ping() #1 {main} thrown in [..]/redis.php on line 32
  </code></pre>
  
  <p>the only thing I could find on Google was the timeout settings, which did not work. I've tried several image versions, alpine, latest, 5.0.8; all the same error.</p>
  
  <p>Does anyone know what's going on here?</p>