title: Why should I close or keep Redis connections open?
body: <p>I'm using Redis in a PHP project. I use phpredis as a client. Sometimes, during long CLI-scripts, I experience PHP segmentation faults.</p>
  
  <p>I've experienced before that phpredis has problems when the connection times out. As my Redis config is configured to automatically close idle connections after 300 seconds, I guess that causes the segmentation fault.</p>
  
  <p>In order to be able to choose whether to increase the connection timeout or default it to 0 (which means "never timeout"), I would like to know what the possible advantages and disadvantages are?</p>
  
  <p><strong>Why should I never close a connection?<br>
  Why should I make sure connections don't stay open?</strong></p>
  
  <p>Thanks</p>