My workflow is stuck at the final reply, but looking at the logs, the large model had already returned a result for this conversation #20786

Closed
opened 2026-02-21 20:08:58 -05:00 by yindo · 1 comment
Owner

Originally created by @komorebi-c9 on GitHub (Dec 3, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.3.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

This is a random phenomenon

Image

✔️ Expected Behavior

The model returns the correct results

Actual Behavior

It's stuck, and the status is always showing as "Running"

Originally created by @komorebi-c9 on GitHub (Dec 3, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.3.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce This is a random phenomenon <img width="465" height="885" alt="Image" src="https://github.com/user-attachments/assets/73638ef8-9b88-43da-9132-50b4cfc2f087" /> ### ✔️ Expected Behavior The model returns the correct results ### ❌ Actual Behavior It's stuck, and the status is always showing as "Running"
yindo added the 🐞 bug🤔 cant-reproduceoutdated labels 2026-02-21 20:08:58 -05:00
yindo closed this issue 2026-02-21 20:08:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 3, 2025):

This issue is likely caused by a known bug where workflows get stuck in the "Running" state due to duplicate key conflicts in the workflow_node_execution database table. This can happen even if the model has already returned a result. The fix for this was introduced after v1.3.1: newer versions use UUID v7 for execution IDs and add retry logic to handle these conflicts, which prevents workflows from getting stuck like this (details).

To confirm if this is your case, check your backend logs for IntegrityError or UniqueViolation exceptions related to workflow_node_execution. You can also inspect your database for entries in workflow_run or workflow_node_execution that are stuck in the "running" state with no finished_at timestamp.

If you find evidence of this issue, upgrading to a version that includes the UUID v7 fix is recommended. If upgrading isn't possible, consider backporting the retry logic from the referenced PR.

If the problem persists, collect detailed backend logs around the time the workflow gets stuck, focusing on event handler and state manager activity, and check for any missing terminal node events or incomplete edge processing. This information will help further diagnose the root cause.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 3, 2025): <!-- Answer --> This issue is likely caused by a known bug where workflows get stuck in the "Running" state due to duplicate key conflicts in the `workflow_node_execution` database table. This can happen even if the model has already returned a result. The fix for this was introduced after v1.3.1: newer versions use UUID v7 for execution IDs and add retry logic to handle these conflicts, which prevents workflows from getting stuck like this ([details](https://github.com/langgenius/dify/pull/24643)). To confirm if this is your case, check your backend logs for `IntegrityError` or `UniqueViolation` exceptions related to `workflow_node_execution`. You can also inspect your database for entries in `workflow_run` or `workflow_node_execution` that are stuck in the "running" state with no `finished_at` timestamp. If you find evidence of this issue, upgrading to a version that includes the UUID v7 fix is recommended. If upgrading isn't possible, consider backporting the retry logic from the referenced PR. If the problem persists, collect detailed backend logs around the time the workflow gets stuck, focusing on event handler and state manager activity, and check for any missing terminal node events or incomplete edge processing. This information will help further diagnose the root cause. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/07d7d4a0-d25b-4bbf-ba69-b64f09e13047?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20issue%20is%20likely%20caused%20by%20a%20known%20bug%20where%20workflows%20get%20stuck%20in%20the%20%22Running%22%20state%20due%20to%20duplicate%20key%20conflicts%20in%20the%20%60workflow_node_execution%60%20database%20table.%20This%20can%20happen%20even%20if%20the%20model%20has%20already%20returned%20a%20result.%20The%20fix%20for%20this%20was%20introduced%20after%20v1.3.1%3A%20newer%20versions%20use%20UUID%20v7%20for%20execution%20IDs%20and%20add%20retry%20logic%20to%20handle%20these%20conflicts%2C%20which%20prevents%20workflows%20from%20getting%20stuck%20like%20this%20%28%5Bdetails%5D%28https%3A//github.com/langgenius/dify/pull/24643%29%29.%0A%0ATo%20confirm%20if%20this%20is%20your%20case%2C%20check%20your%20backend%20logs%20for%20%60IntegrityError%60%20or%20%60UniqueViolation%60%20exceptions%20related%20to%20%60workflow_node_execution%60.%20You%20can%20also%20inspect%20your%20database%20for%20entries%20in%20%60workflow_run%60%20or%20%60workflow_node_execution%60%20that%20are%20stuck%20in%20the%20%22running%22%20state%20with%20no%20%60finished_at%60%20timestamp.%0A%0AIf%20you%20find%20evidence%20of%20this%20issue%2C%20upgrading%20to%20a%20version%20that%20includes%20the%20UUID%20v7%20fix%20is%20recommended.%20If%20upgrading%20isn%27t%20possible%2C%20consider%20backporting%20the%20retry%20logic%20from%20the%20referenced%20PR.%0A%0AIf%20the%20problem%20persists%2C%20collect%20detailed%20backend%20logs%20around%20the%20time%20the%20workflow%20gets%20stuck%2C%20focusing%20on%20event%20handler%20and%20state%20manager%20activity%2C%20and%20check%20for%20any%20missing%20terminal%20node%20events%20or%20incomplete%20edge%20processing.%20This%20information%20will%20help%20further%20diagnose%20the%20root%20cause.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29113)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20786