title: ElasticSearch docker "HTTP/1.1 429 Too Many Requests" after 360k documents
body: <p>I'm trying ElasticSearch 7.9 and wanted to do a benchmark on 1M documents. I use the 'single node' docker image.</p>
  <p>I use the high level java client to index documents using <code>BulkRequest</code>. I consistenly get a <code>Too Many Requests</code> exception after 360k requests, even if I put some <code>sleep(1000)</code> statements after each <code>10k</code> docs.</p>
  <p>I tried increasing the memory in the <code>jvm.options</code> from <code>1G</code> to <code>8G</code> but that did not affect it.</p>
  <p>Is there an option to increase this number of requests?</p>
  <p>My laptop has 4 cores and 16GB and docker is not limited in any way.</p>
  <p>Error details:</p>
  <pre><code>{&quot;error&quot;:{&quot;root_cause&quot;:[{&quot;type&quot;:&quot;es_rejected_execution_exception&quot;,&quot;reason&quot;:&quot;rejected execution of coordinating operation [coordinating_and_primary_bytes=0, replica_bytes=0, all_bytes=0, coordinating_operation_bytes=108400734, max_coordinating_and_primary_bytes=107374182]&quot;}],&quot;type&quot;:&quot;es_rejected_execution_exception&quot;,&quot;reason&quot;:&quot;rejected execution of coordinating operation [coordinating_and_primary_bytes=0, replica_bytes=0, all_bytes=0, coordinating_operation_bytes=108400734, max_coordinating_and_primary_bytes=107374182]&quot;},&quot;status&quot;:429}
  </code></pre>
  <h2>Indexing code</h2>
  <pre><code>            CreateIndexRequest createIndexRequest = new CreateIndexRequest(index);
              createIndexRequest.mapping(
                      &quot;{\n&quot; +
                              &quot;  \&quot;properties\&quot;: {\n&quot; +
                              &quot;    \&quot;category\&quot;: {\n&quot; +
                              &quot;      \&quot;type\&quot;: \&quot;keyword\&quot;\n&quot; +
                              &quot;    },\n&quot; +
                              &quot;    \&quot;title\&quot;: {\n&quot; +
                              &quot;      \&quot;type\&quot;: \&quot;keyword\&quot;\n&quot; +
                              &quot;    },\n&quot; +
                              &quot;    \&quot;naam\&quot;: {\n&quot; +
                              &quot;      \&quot;type\&quot;: \&quot;keyword\&quot;\n&quot; +
                              &quot;    }\n&quot; +
                              &quot;  }\n&quot; +
                              &quot;}&quot;,
                      XContentType.JSON);
              CreateIndexResponse createIndexResponse = client.indices().create(createIndexRequest, RequestOptions.DEFAULT);
  
              for (int b=0;b&lt;100; b++) {
                  List&lt;Book&gt; bookList = new ArrayList&lt;&gt;();
                  for (int i = 0; i &lt; 10_000; i++) {
                      int item = b*100_000 + i;
                      bookList.add(new Book(&quot;&quot; + item,
                              item % 2 == 0 ? &quot;aap&quot; : &quot;banaan&quot;,
                              item % 4 == 0 ? &quot;naam1&quot; : &quot;naam2&quot;,
                              &quot;Rob&quot; + item,
                              &quot;The great start&quot; + item/100,
                              item));
                  }
                  bookList.forEach(book -&gt; {
                      IndexRequest indexRequest = new IndexRequest().
                              source(objectMapper.convertValue(book, Map.class)).index(index).id(book.id());
                      bulkRequest.add(indexRequest);
                  });
                  System.out.println(&quot;Ok, batch: &quot; + b);
                  bulkRequest.timeout(TimeValue.timeValueSeconds(20));
                  try {
                      Thread.sleep(1_000);
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  }
                  try {
                      client.bulk(bulkRequest, RequestOptions.DEFAULT);
                      System.out.println(&quot;Ok2&quot;);
                  } catch (IOException e) {
                      e.printStackTrace();
  //            System.out.println(objectMapper.convertValue(book, Map.class));
                  }
              }
  </code></pre>