# Workflow stuck in "running" state

**URL:** <https://community.n8n.io/t/workflow-stuck-in-running-state/40473>\
**Category:** Questions\
**Tags:** deployment, redis\
**Created:** [February 19, 2024, 7:42am UTC](https://community.n8n.io/t/workflow-stuck-in-running-state/40473 "2024-02-19T07:42:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yichi-yang](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yichi-yang](https://community.n8n.io/u/yichi-yang)\
**Post date:** [February 19, 2024, 7:42am UTC](https://community.n8n.io/t/workflow-stuck-in-running-state/40473/1 "2024-02-19T07:42:56Z")

</div>

## Describe the problem/error/question

I have a self hosted instance of n8n and the below very simple workflow. For some reason the “test workflow” button works as expected, but when I enable the workflow, the resulting executions never finish running.

 ![Screenshot 2024-02-18 234114](https://europe1.discourse-cdn.com/n8n/original/3X/9/2/92dadd0fc29a5e2c4c043072c65a0b109291a9b2.png)

I’m quite new to n8n, so I’d appreciate any advice on where to start debugging.

## What is the error message (if any)?

Nothing suspicious on `stdout`/`stderr`.

## Please share your workflow

## Share the output returned by the last node

N/A

## Information on your n8n setup

- **n8n version:** 1.25.1
- **Database (default: SQLite):** PostgreSQL
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** `EXECUTIONS_MODE=queue`
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** docker
- **Operating system:** TrueNAS-SCALE-23.10.0.1 (Debian GNU/Linux 12)

---

<div class="post-metadata">

**Author:** ![yichi-yang](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yichi-yang](https://community.n8n.io/u/yichi-yang)\
**Post date:** [February 20, 2024, 6:41pm UTC](https://community.n8n.io/t/workflow-stuck-in-running-state/40473/2 "2024-02-20T18:41:29Z")

</div>

```auto
2024-02-20 10:35:29.371213-08:002024-02-20T18:35:29.370Z | e[32minfoe[39m | e[32m - "My workflow" (ID: 73KqfNlOEPzxMfow)e[39m "{ file: 'ActiveWorkflowRunner.js', function: 'add' }"
2024-02-20 10:35:29.371515-08:002024-02-20T18:35:29.371Z | e[34mdebuge[39m | e[34mInitializing active workflow "My workflow" (ID: 73KqfNlOEPzxMfow) (startup)e[39m "{\n workflowName: 'My workflow',\n workflowId: '73KqfNlOEPzxMfow',\n file: 'ActiveWorkflowRunner.js',\n function: 'add'\n}"
2024-02-20 10:35:29.378034-08:002024-02-20T18:35:29.377Z | e[34mdebuge[39m | e[34mAdding triggers and pollers for workflow "My workflow" (ID: 73KqfNlOEPzxMfow)e[39m "{ file: 'ActiveWorkflowRunner.js', function: 'addTriggersAndPollers' }"
2024-02-20 10:35:29.381017-08:002024-02-20T18:35:29.380Z | e[36mverbosee[39m | e[36mWorkflow "My workflow" (ID: 73KqfNlOEPzxMfow) activatede[39m "{\n workflowId: '73KqfNlOEPzxMfow',\n workflowName: 'My workflow',\n file: 'ActiveWorkflowRunner.js',\n function: 'addTriggersAndPollers'\n}"
2024-02-20 10:35:36.394435-08:002024-02-20T18:35:36.394Z [Rudder] debug: in flush
2024-02-20 10:35:36.394507-08:002024-02-20T18:35:36.394Z [Rudder] debug: cancelling existing flushTimer...
2024-02-20 10:35:48.013493-08:002024-02-20T18:35:48.011Z | e[34mdebuge[39m | e[34mWait tracker querying database for waiting executionse[39m "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
2024-02-20 10:36:29.401422-08:002024-02-20T18:36:29.400Z | e[34mdebuge[39m | e[34mReceived trigger for workflow "My workflow"e[39m "{ file: 'ActiveWorkflowRunner.js', function: 'returnFunctions.emit' }"
2024-02-20 10:36:29.498151-08:00Started with job ID: 1 (Execution ID: 150)
2024-02-20 10:36:48.013534-08:002024-02-20T18:36:48.012Z | e[34mdebuge[39m | e[34mWait tracker querying database for waiting executionse[39m "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
2024-02-20 10:37:09.349978-08:002024-02-20T18:37:09.349Z | e[36mverbosee[39m | e[36mSuccessfully deactivated workflow "73KqfNlOEPzxMfow"e[39m "{\n workflowId: '73KqfNlOEPzxMfow',\n file: 'ActiveWorkflowRunner.js',\n function: 'remove'\n}"
2024-02-20 10:37:09.379366-08:002024-02-20T18:37:09.378Z [Rudder] debug: no existing flush timer, creating new one
2024-02-20 10:37:19.380777-08:002024-02-20T18:37:19.379Z [Rudder] debug: in flush
2024-02-20 10:37:19.381051-08:002024-02-20T18:37:19.380Z [Rudder] debug: cancelling existing flushTimer...
2024-02-20 10:37:48.014112-08:002024-02-20T18:37:48.013Z | e[34mdebuge[39m | e[34mWait tracker querying database for waiting executionse[39m "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"
2024-02-20 10:38:48.015209-08:002024-02-20T18:38:48.014Z | e[34mdebuge[39m | e[34mWait tracker querying database for waiting executionse[39m "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"

```

Turned on debug logging and here is the log (execution `150` never finished).

---

<div class="post-metadata">

**Author:** ![EmeraldHerald](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/emeraldherald/32/35355_2.png) [@EmeraldHerald](https://community.n8n.io/u/EmeraldHerald)\
**Post date:** [February 22, 2024, 10:47am UTC](https://community.n8n.io/t/workflow-stuck-in-running-state/40473/3 "2024-02-22T10:47:15Z")

</div>

Hi @yichi-yang 👋 What you’re describing sounds like a problem with your workers - text executions are run on the main instance, but production executions are sent over to the workers instead.

Do you have your workers up and running, and can they communicate with both Redis and your database?

---

<div class="post-metadata">

**Author:** ![yichi-yang](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yichi-yang](https://community.n8n.io/u/yichi-yang)\
**Post date:** [February 22, 2024, 5:19pm UTC](https://community.n8n.io/t/workflow-stuck-in-running-state/40473/4 "2024-02-22T17:19:58Z")

</div>

You are right! I’m using the [helm chart](https://github.com/truenas/charts/tree/master/community/n8n) maintained by the TrueNAS community. It seems like it never starts the worker processes. I’ll file a bug report there.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [March 1, 2024, 8:04am UTC](https://community.n8n.io/t/workflow-stuck-in-running-state/40473/5 "2024-03-01T08:04:21Z")

</div>

Closed on March 1, 2024, 8:04am UTC

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