Replies: 1 comment
-
Hi @ZYSpro! I'm Dosu and I’m helping the dify team. This is a known issue in Dify: when you abort a streaming call (for example, by disconnecting the client), the workflow can get stuck in the "running" state because the main thread handling database updates is killed before it can mark the workflow as stopped or failed. This means you can't query or manage these suspended workflows through the usual APIs, and logging, results, and token tracking are also missing for these runs. The recommended architectural fix is to decouple database operations from the main thread so status updates can still happen even if the client disconnects, but this hasn't been implemented yet see details. For now, the only workaround is manual intervention: you can update the workflow status directly in the database or use any available admin API endpoints to mark stuck workflows as failed or stopped. If you need to automate this, look for functions in the workflow node execution repository that allow status updates, and script a cleanup for workflows that have been "running" for too long without progress. This issue only affects streaming mode; non-streaming workflows are not impacted. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
If I use streaming, I abort the call, and subsequently, when I check, the result is always "running"
Beta Was this translation helpful? Give feedback.
All reactions