# Workflows Stuck in Running Mode for Several Days

**URL:** <https://community.temporal.io/t/workflows-stuck-in-running-mode-for-several-days/2667>\
**Category:** Community Support\
**Tags:** java-sdk, cassandra\
**Created:** [August 6, 2021, 1:32am UTC](https://community.temporal.io/t/workflows-stuck-in-running-mode-for-several-days/2667 "2021-08-06T01:32:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramyamagham](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ramyamagham/32/1125_2.png) [@ramyamagham](https://community.temporal.io/u/ramyamagham)\
**Post date:** [August 6, 2021, 1:32am UTC](https://community.temporal.io/t/workflows-stuck-in-running-mode-for-several-days/2667/1 "2021-08-06T01:32:54Z")

</div>

The application has been idle from Aug 3rd UTC, all the workflows are given 45 seconds WorkflowExecution Timeout and Task timeout of 15 seconds.  
The activities have 3 retries and StartToClose Timeout and ScheduleToClose Timeout as 1 second.  
The cluster has been idle without any incoming traffic. But the server has been running about 4K “getTasks” operations (graphs are attached). The DB is seeing the traffic and even on the UI, all these tasks show up as still “Running”.

How can we get rid of these tasks which the application is expected to discard after workflow has timeout within 45 seconds.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/0/0c6a73c65cd51e6fa1216c52196358636048b254.png)

---

<div class="post-metadata">

**Author:** ![ramyamagham](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ramyamagham/32/1125_2.png) [@ramyamagham](https://community.temporal.io/u/ramyamagham)\
**Post date:** [August 6, 2021, 1:34am UTC](https://community.temporal.io/t/workflows-stuck-in-running-mode-for-several-days/2667/2 "2021-08-06T01:34:40Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/0/0e76ca3267719f7d842a060054519b99d6aecacc.png)  
Tasks from several days ago which show up as still “Running” which is causing the system to query Cassandra unnecessarily for workflows that are discarded by the application.

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [August 24, 2021, 4:00am UTC](https://community.temporal.io/t/workflows-stuck-in-running-mode-for-several-days/2667/3 "2021-08-24T04:00:02Z")

</div>

Hi @ramyamagham sorry your question did not get a response so far. Can you let us know if this is still an issue?

You could use the Temporal CLI (tctl) to batch-terminate all workflows for a provided namespace.  
See the [tctl docs page](https://docs.temporal.io/docs/system-tools/tctl/) for more info.
