title: ESOCKETTIMEDOUT with remote CouchDB
body: <p>I'm running a CouchDB server with docker and I'm trying to POST data through a Node app.</p>
  
  <p>But I'm frequently prompted with a ESOCKETTIMEDOUT error (not always).</p>
  
  <p>Here's the way I'm opening the connexion to the DB:</p>
  
  <pre><code>var remoteDB = new PouchDB('http://localhost:5984/dsndatabase', {
    ajax: {
      cache: true,
      timeout: 40000 // I tried a lot of durations
    }
  });
  </code></pre>
  
  <p>And here's the code used to send the data :</p>
  
  <pre><code>exports.sendDatas = function(datas,db, time) {
    console.log('&gt; Export vers CouchDB')
    db.bulkDocs(datas).then(function () {
      return db.allDocs({include_docs: true});
    }).then(function (){
      var elapsedTime = new Date().getTime() - time;
      console.log('&gt; Export terminé en ', elapsedTime, ' ms');
    }).catch(function (err) {
      console.log(err);
    })
  };
  </code></pre>
  
  <p>The error doesn't show up every time but I'm unable to find a pattern.</p>
  
  <p>And, timeout or not, all my data is successfully loaded in my CouchDB !</p>
  
  <p>I've seen a lot of posts on this issue but none of them really answers my question ...</p>
  
  <p>Any idea ?</p>