# Dangling search tasks which are even few days old

**URL:** <https://discuss.elastic.co/t/dangling-search-tasks-which-are-even-few-days-old/368350>\
**Category:** Elasticsearch\
**Created:** [October 7, 2024, 12:20pm UTC](https://discuss.elastic.co/t/dangling-search-tasks-which-are-even-few-days-old/368350 "2024-10-07T12:20:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreekanth\_makam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sreekanth_makam/32/120241_2.png) [@sreekanth\_makam](https://discuss.elastic.co/u/sreekanth_makam)\
**Post date:** [October 7, 2024, 12:20pm UTC](https://discuss.elastic.co/t/dangling-search-tasks-which-are-even-few-days-old/368350/1 "2024-10-07T12:20:38Z")

</div>

Elastic Search version: 8

We are passing timeout to search query and query is timing out properly if it cross that time. But I see a active task still running in /\_tasks output.  
few tasks are like days old and eating up resources.  
some times i need to manually cancel the task and if doesn;t work restart the node.  
How do we force the task to get cleaned up automatically as as it times out? There is no point running that further.
