# Kibana saved objects create api is taking for ever, cluster tasks pending for a long time

**URL:** <https://discuss.elastic.co/t/kibana-saved-objects-create-api-is-taking-for-ever-cluster-tasks-pending-for-a-long-time/261710>\
**Category:** Kibana\
**Created:** [January 20, 2021, 11:35pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-create-api-is-taking-for-ever-cluster-tasks-pending-for-a-long-time/261710 "2021-01-20T23:35:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [January 20, 2021, 11:35pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-create-api-is-taking-for-ever-cluster-tasks-pending-for-a-long-time/261710/1 "2021-01-20T23:35:11Z")

</div>

Hi Team,

Kibana saved objects create api is taking forever, cluster tasks are pending for a long time.  
I am trying to create search, visualization, dashboards using kibana saved objects api.  
observed that it is dead slow and response time of the kibana node goes very high.  
I did tcp tuning from OS end and dont see any issues there.  
The heap usage is normal on all the cluster nodes.  
I am running with ELK 6.8 version.  
cluster status is always "green".

cluster pending tasks list goes high. The kibana node response time shows high in monitoring.

"number\_of\_pending\_tasks" : 69  
"task\_max\_waiting\_in\_queue\_millis" : 29914

When I checked the pending tasks it is showing the below entries taking long time.  
"source" : "create-index-template [kibana\_index\_template:.kibana], cause [api]"

Please advise how can I tune this and speed up the cluster tasks execution of object creation.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 20, 2021, 11:37pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-create-api-is-taking-for-ever-cluster-tasks-pending-for-a-long-time/261710/2 "2021-01-20T23:37:12Z")

</div>

What is the output from the `_cluster/stats?pretty&human` API in Elasticsearch?

---

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [January 25, 2021, 6:25pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-create-api-is-taking-for-ever-cluster-tasks-pending-for-a-long-time/261710/3 "2021-01-25T18:25:59Z")

</div>

Apologies, I could not send the cluster stats whole output, But please let me know if you need specific info, I can provide.  
I have found the below task is showing long pending which is causing issue.  
please advise  
{  
"insert\_order" : 2770864,  
"priority" : "HIGH",  
"source" : "cluster\_reroute(async\_shard\_fetch)",  
"executing" : false,  
"time\_in\_queue\_millis" : 65907004,  
"time\_in\_queue" : "18.3h"  
},

---

<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:** [February 22, 2021, 6:26pm UTC](https://discuss.elastic.co/t/kibana-saved-objects-create-api-is-taking-for-ever-cluster-tasks-pending-for-a-long-time/261710/4 "2021-02-22T18:26:22Z")

</div>

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