llm node keep running status after cutting off #15226

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

Originally created by @skyfire0705 on GitHub (Jul 9, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.5.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When requesting Chatflow via API, if an error occurs in the background program during the output of the LLM node, an exception is thrown and the request is cut off. However, the LLM node still shows a "running" status in Dify's logs, and no detail logs are visible.

✔️ Expected Behavior

the llm node shows corret status and record output before request cutting off

Actual Behavior

Image
Originally created by @skyfire0705 on GitHub (Jul 9, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.5.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When requesting Chatflow via API, if an error occurs in the background program during the output of the LLM node, an exception is thrown and the request is cut off. However, the LLM node still shows a "running" status in Dify's logs, and no detail logs are visible. ### ✔️ Expected Behavior the llm node shows corret status and record output before request cutting off ### ❌ Actual Behavior <img width="736" height="214" alt="Image" src="https://github.com/user-attachments/assets/69b37187-6c67-4a11-a357-c48c94bdc058" />
yindo added the 🐞 bugstale labels 2026-02-21 19:20:46 -05:00
yindo closed this issue 2026-02-21 19:20:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 9, 2025):

This issue happens because, while Dify’s LLM node code is designed to update the node status to FAILED and log errors when exceptions occur, if the API connection is abruptly cut off (like a client disconnect or forced termination), the final status update and error logs may not be processed or persisted. This can leave the node stuck in the "running" state with no visible error details in the UI, even though the backend has the logic to handle failures and log them properly (LLMNode error handling, workflow status management).

Recent pull requests show ongoing improvements to LLM node robustness and usage tracking, but there’s no direct fix for this abrupt disconnect scenario in versions after 1.5.1. The infrastructure for status and error tracking exists, but event and status persistence can fail if the process is interrupted before completion.

As a workaround, you might want to check your server logs directly for error traces, and consider updating to the latest version if possible, as improvements are ongoing. For a more robust solution, handling abrupt disconnects and ensuring node status persistence even on forced termination would require changes to how events are finalized and persisted in the workflow engine.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 9, 2025): <!-- Answer --> This issue happens because, while Dify’s LLM node code is designed to update the node status to FAILED and log errors when exceptions occur, if the API connection is abruptly cut off (like a client disconnect or forced termination), the final status update and error logs may not be processed or persisted. This can leave the node stuck in the "running" state with no visible error details in the UI, even though the backend has the logic to handle failures and log them properly ([LLMNode error handling](https://github.com/langgenius/dify/blob/4cb50f1809cb6c888d7177a6909d6738686a1e76/api/core/workflow/nodes/llm/node.py), [workflow status management](https://github.com/langgenius/dify/blob/4cb50f1809cb6c888d7177a6909d6738686a1e76/api/core/workflow/workflow_cycle_manager.py)). Recent pull requests show ongoing improvements to LLM node robustness and usage tracking, but there’s no direct fix for this abrupt disconnect scenario in versions after 1.5.1. The infrastructure for status and error tracking exists, but event and status persistence can fail if the process is interrupted before completion. As a workaround, you might want to check your server logs directly for error traces, and consider updating to the latest version if possible, as improvements are ongoing. For a more robust solution, handling abrupt disconnects and ensuring node status persistence even on forced termination would require changes to how events are finalized and persisted in the workflow engine. <!-- 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/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ad0766e8-b3d6-4990-a11d-ace0e13ae0fc?feedback_type=other)</sup>&nbsp;&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/22110)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15226