title: Redis ETIMEDOUT error after some time of connection
body: <p>Overview</p>
  
  <p>On two separate Azure instances, on first one node.js servers are running and they connect to single node redis server running on second instance and node.js is trying to keep active connection with redis. Node Redis module is being used to store and retrieve data in redis and socket.io-emitter module is used to allow different servers to send messages based on collective connectivity of clients. </p>
  
  <p>Problem </p>
  
  <p>After the initial connection is done after sometime (sporadic)the connection freezes and finally crashes with ETIMEDOUT error being thrown from all servers. </p>
  
  <p>What have I tried. </p>
  
  <p>i. Added <code>socket_keepalive</code> first and then together with socket_initialdelay</p>
  
  <pre><code>const redis = require('redis');
  let options = {socket_keepalive : true, socket_initialdelay : 200000};
  global.client = redis.createClient(port, host, options);
  </code></pre>
  
  <p>ii. With <code>socket.io-emitter</code> module tried initialising it with new redis object using node redis module itself but the notifications stopped working after that so retracted back to the same thing. </p>
  
  <p><strong>This stopped the notification to devices individually</strong></p>
  
  <pre><code>let options = {socket_keepalive : true, socket_initialdelay : 200000};
  let redis_socket = require('redis');
  let pub = redis_socket.createClient(port, host, options);
  let ioz = require('socket.io-emitter')(pub);
  </code></pre>
  
  <p>*Obviously the timed out issue exists with the working method. </p>
  
  <p>iii. On redis's server the timeout config is set at 0 and tcpdelay was 300 seconds but we tried changing it to 0 (tcpdelay) but still the problem persists. </p>
  
  <p>It definitely breaks my head because same piece of code works in another environment but what is causing this is still a mystery, after investigating a bit more I realised that the clients connected (available with monitor command) drops after some time and hence etimedout error is thrown. </p>
  
  <p>Same redis machine is also used for caching and it is working without any issue. </p>