# Spark-es too many request error - 429 error code

**URL:** <https://discuss.elastic.co/t/spark-es-too-many-request-error-429-error-code/204298>\
**Category:** Elasticsearch\
**Created:** [October 19, 2019, 8:18am UTC](https://discuss.elastic.co/t/spark-es-too-many-request-error-429-error-code/204298 "2019-10-19T08:18:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishnu\_Singhal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vishnu_singhal/32/52488_2.png) [@Vishnu\_Singhal](https://discuss.elastic.co/u/Vishnu_Singhal)\
**Post date:** [October 19, 2019, 8:18am UTC](https://discuss.elastic.co/t/spark-es-too-many-request-error-429-error-code/204298/1 "2019-10-19T08:18:00Z")

</div>

Node Hot thread api gives following input

::: {appsec-es-master-0}{AAw21yu1Q1e5ZWMoBe2ZPA}{4IRnxBeST3ODTCHlLq\_FqA}{10.244.3.48}{10.244.3.48:9300}{ml.machine\_memory=2147483648, xpack.installed=true, ml.max\_open\_jobs=20}  
Hot threads at 2019-10-19T08:13:45.483Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

```
0.0% (59.9micros out of 500ms) cpu usage by thread 'ticker-schedule-trigger-engine'
 10/10 snapshots sharing following 2 elements
   java.base@12.0.1/java.lang.Thread.sleep(Native Method)
   org.elasticsearch.xpack.watcher.trigger.schedule.engine.TickerScheduleTriggerEngine$Ticker.run(TickerScheduleTriggerEngine.java:193)

```

::: {appsec-es-master-2}{1QhuWcAaSni6YXA-sYOZhA}{s\_fab2RrTgynFgGbf0paQA}{10.244.2.80}{10.244.2.80:9300}{ml.machine\_memory=2147483648, ml.max\_open\_jobs=20, xpack.installed=true}  
Hot threads at 2019-10-19T08:13:50.153Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

```
0.0% (40.6micros out of 500ms) cpu usage by thread 'ticker-schedule-trigger-engine'
 10/10 snapshots sharing following 2 elements
   java.base@12.0.1/java.lang.Thread.sleep(Native Method)
   org.elasticsearch.xpack.watcher.trigger.schedule.engine.TickerScheduleTriggerEngine$Ticker.run(TickerScheduleTriggerEngine.java:193)

```

::: {appsec-es-master-1}{gSxXRZG-SqC\_i0GWGvAxgg}{y\_Sgn76wQU27Ly3hqX0v7Q}{10.244.11.73}{10.244.11.73:9300}{ml.machine\_memory=2147483648, ml.max\_open\_jobs=20, xpack.installed=true}  
Hot threads at 2019-10-19T08:13:57.155Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

Following Error in the spark logs

org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 477417.0 failed 4 times, most recent failure: Lost task 0.3 in stage 477417.0 (TID 1048412, 10.244.8.111, executor 1): org.elasticsearch.hadoop.rest.EsHadoopInvalidRequest: [HEAD] on [appsec\_destination\_owasp] failed; server[10.244.3.48:9200] returned [429|Too Many Requests:]  
at org.elasticsearch.hadoop.rest.RestClient.checkResponse(RestClient.java:469)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 19, 2019, 8:23am UTC](https://discuss.elastic.co/t/spark-es-too-many-request-error-429-error-code/204298/2 "2019-10-19T08:23:48Z")

</div>

Have a look at [this blog post about bulk rejections](https://www.elastic.co/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-cluster).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 16, 2019, 8:23am UTC](https://discuss.elastic.co/t/spark-es-too-many-request-error-429-error-code/204298/3 "2019-11-16T08:23:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
