# Priority of pending tasks

**URL:** <https://discuss.elastic.co/t/priority-of-pending-tasks/18309>\
**Category:** Elasticsearch\
**Created:** [June 24, 2014, 9:10pm UTC](https://discuss.elastic.co/t/priority-of-pending-tasks/18309 "2014-06-24T21:10:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish\_Nigam\_3](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Ashish\_Nigam\_3](https://discuss.elastic.co/u/Ashish_Nigam_3)\
**Post date:** [June 24, 2014, 9:10pm UTC](https://discuss.elastic.co/t/priority-of-pending-tasks/18309/1 "2014-06-24T21:10:39Z")

</div>

Hi,  
Is there any way to update how elasticsearch manages priority in pending  
tasks queue?  
Here's some background -  
My cluster was in yellow state for more than a day and now it is green, But  
it seems shards are being started and that also is taking lot of time.

Now, I give delete index request and that's how queue looks -

curl -XGET '[http://10.0.11.120:9200/\_cluster/pending\_tasks](http://10.0.11.120:9200/_cluster/pending_tasks)'?pretty=true

{

"tasks" : [ {

```
"insert_order" : 60444,

"proirity" : "URGENT",

"source" : "delete-index [index_18530]",

"time_in_queue_millis" : 1740,

"time_in_queue" : "1.7s"

```

}, {

```
"insert_order" : 60443,

"proirity" : "HIGH",

"source" : "shard-started ([index_18227][1],

```

node[t8aivPciQwSqdgJYj1iY2w], relocating [H52VhU9pQRuS2Mp-YtcD7Q], [P],  
s[INITIALIZING]), reason [after recovery (replica) from node  
[[esearch08][H52VhU9pQRuS2Mp-YtcD7Q][inet[/10.0.11.128:9300]]{master=false,  
zone=zone\_spop-sjc}]]",

```
"time_in_queue_millis" : 39494,

"time_in_queue" : "39.4s"

```

} ]

As you see, my delete request has propriety of URGENT.

But after 30 seconds this request times out

{"error":"RemoteTransportException[[esearch00][inet[/10.0.11.120:9300]][indices/delete]];  
nested: ProcessClusterEventTimeoutException[failed to process cluster event  
(delete-index [index\_18530]) within 30s]; ","status":503}

It seems that URGENT request timed-out because of other HIGH priority  
requests.

Is there any way to execute delete request successfully even if shards of  
other index are being moved around or started?

Thanks

Ashish

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CANsfGR%3DE0rPinu3GiaawbmDt4MNLCGUrf%2BLyQcUK4s8j6Utndw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANsfGR%3DE0rPinu3GiaawbmDt4MNLCGUrf%2BLyQcUK4s8j6Utndw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![ddp](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@ddp](https://discuss.elastic.co/u/ddp)\
**Post date:** [January 22, 2015, 6:24pm UTC](https://discuss.elastic.co/t/priority-of-pending-tasks/18309/2 "2015-01-22T18:24:49Z")

</div>

Hi Ashish,

We are seeing similar issues in our cluster. Any urgent priority tasks  
blacks all other high priority tasks and the pending tasks queue grows like  
anything. Did you figure out how to deal with such situation ?

Darsh

On Tuesday, June 24, 2014 at 2:10:46 PM UTC-7, Ashish Nigam wrote:

> Hi,  
> Is there any way to update how elasticsearch manages priority in pending  
> tasks queue?  
> Here's some background -  
> My cluster was in yellow state for more than a day and now it is green,  
> But it seems shards are being started and that also is taking lot of time.
> 
> Now, I give delete index request and that's how queue looks -
> 
> curl -XGET '[http://10.0.11.120:9200/\_cluster/pending\_tasks](http://10.0.11.120:9200/_cluster/pending_tasks)'?pretty=true
> 
> {
> 
> "tasks" : [ {
> 
> ```
> "insert_order" : 60444,
> 
> "proirity" : "URGENT",
> 
> "source" : "delete-index [index_18530]",
> 
> "time_in_queue_millis" : 1740,
> 
> "time_in_queue" : "1.7s"
> 
> ```
> 
> }, {
> 
> ```
> "insert_order" : 60443,
> 
> "proirity" : "HIGH",
> 
> "source" : "shard-started ([index_18227][1], 
> 
> ```
> 
> node[t8aivPciQwSqdgJYj1iY2w], relocating [H52VhU9pQRuS2Mp-YtcD7Q], [P],  
> s[INITIALIZING]), reason [after recovery (replica) from node  
> [[esearch08][H52VhU9pQRuS2Mp-YtcD7Q][inet[/10.0.11.128:9300]]{master=false,  
> zone=zone\_spop-sjc}]]",
> 
> ```
> "time_in_queue_millis" : 39494,
> 
> "time_in_queue" : "39.4s"
> 
> ```
> 
> } ]
> 
> As you see, my delete request has propriety of URGENT.
> 
> But after 30 seconds this request times out
> 
> {"error":"RemoteTransportException[[esearch00][inet[/10.0.11.120:9300]][indices/delete]];  
> nested: ProcessClusterEventTimeoutException[failed to process cluster event  
> (delete-index [index\_18530]) within 30s]; ","status":503}
> 
> It seems that URGENT request timed-out because of other HIGH priority  
> requests.
> 
> Is there any way to execute delete request successfully even if shards of  
> other index are being moved around or started?
> 
> Thanks
> 
> Ashish

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6c2ab7f2-0b98-4aa3-aa74-a07ae70dc7d9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6c2ab7f2-0b98-4aa3-aa74-a07ae70dc7d9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:37am UTC](https://discuss.elastic.co/t/priority-of-pending-tasks/18309/3 "2017-07-06T00:37:10Z")

</div>


