title: Why does Elasticsearch bulk index API creates documents after long time?
body: <p>I have a Elasticsearch cluster with two nodes. Using Node js bulk insert API, I insert streaming data as batch of 1000 documents per insert using below code,</p>
  
  <pre><code>esclient1.bulk({
    body: messages
  }, function (err, resp) {
    //handle resp
  });
  </code></pre>
  
  <p>The messages gets posted to the server, but the documents gets created only after an hour or two. Don't know why such delay. </p>
  
  <p>There was a total of 2M records split into 1K per bulk insert. Even after 24 hrs the documents are still being indexed. Please let me know where the issue might be.</p>
  
  <p>We use AWS EC2 m3.large (7.5 GB RAM, 32 GB SSD storage) x 2</p>
  
  <p>The Kibana status shows Heap Total (MB) - 652.92 &amp; Heap Used (MB) - 631.56. Is this the cause for slow index creation?</p>