title: ElasticSearch stats API taking long time to response
body: <p>We have an ES cluster at AWS running with the following setup:</p>
  
  <p><em>(I know, i need minimum 3 master nodes)</em></p>
  
  <ul>
  <li>1 Coordinator</li>
  <li>2 Data nodes</li>
  <li>1 Master Node</li>
  </ul>
  
  <p><strong>Data nodes spec:</strong></p>
  
  <ul>
  <li>CPU: 8 Cores</li>
  <li>Ram: 20GB</li>
  <li>Disk: 1TB ssd 4000 IOPS</li>
  </ul>
  
  <p><strong>Problem</strong>:</p>
  
  <p>ES endpoints for Search, Delete, Backup, Cluster Heatlh, Insert are working fine.</p>
  
  <p>Since yesterday some endpoints like <code>/_cat/indices</code>, <code>/_nodes/_local/stats</code> and etc, started to  take too long to respond(more than 4 minutes) :( and consequently our Kibana is in red state(<em>Timeout after 30000ms</em>)</p>
  
  <p><strong>Useful info:</strong></p>
  
  <p>All Shards are OK (3500 in total) <br>
  The cluster is in green state <br>
  X-pack disabled <br>
  Average of 1gb/shard <br> 
  500k document count. <br>
  Requests made by localhost at AWS <br> 
  CPU, DISK, RAM, IOPS all fine<br> </p>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance :)</p>
  
  <p>EDIT/SOLUTION 1:</p>
  
  <p>After a few days i found out what was the problem, but first a little bit context...</p>
  
  <p>We use Elasticsearch  for storing user audit messages, and mobile error messages, at the first moment (obiviously in a rush to deliver new microservices and remove load from our MongoDB cluster) we designed elasticsearch indices by day, so every day a new indice was created and at the end of the day that indice had arround 6 ~ 9gb of data.
  Six months later, almost 180 indices bigger, and 720 primary shards open we bumped into this problem.</p>
  
  <p>Then i did read  this again(the basics!) :
  <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/_basic_concepts.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/_basic_concepts.html</a></p>
  
  <p>After talking to the team responsible for this microservice we redesigned our indices to a monthly index, and guess what? problem solved!</p>
  
  <p>Now our cluster is much faster than before and this simple command saved me some sweet nights of sleep.</p>
  
  <p><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html</a></p>
  
  <p>Thanks!</p>