Workflow tasks are completed but cannot be ended
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
v1.0.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
DSL.zip Attached is the DSL file for the workflow I created. Test input:
- title: 庄子的人生感悟
- chapter: 1.得失的故事 2.困境的故事 3.选择的故事 4.评价的故事 5.心态的故事
✔️ Expected Behavior
End the workflow normally and output the results.
❌ Actual Behavior
When debugging and running in the workflow editor, the workflow can be completed normally and the results can be output. However, when publishing and running, the workflow cannot be completed.
Hello, @icedream2linxi! I'm here to help you with any bugs, questions, or contributions you might have. Let's work together to solve this issue.
I found a similar unsolved discussion titled Workflow Functionality Issue on the Dify Online Platform, which might be related to your issue [1].
For your specific problem, there are a few common issues that can prevent a workflow from completing in a self-hosted Dify environment:
-
Connection Issues: Ensure that your self-hosted Dify instance is accessible from the public internet. If there are connection issues, workflows might fail to complete.
-
Execution Errors: Verify that the application is a workflow application and that all required input variables are correctly configured. Check the error logs for any missing variables or other execution errors.
-
DetachedInstanceError: This error can occur during workflow execution due to SQLAlchemy session management issues. If you encounter this error, consider upgrading your Dify installation to version 0.15.0 or later, which includes fixes for these issues [2][3].
Additionally, ensure that your environment variables and configuration settings are correctly set up, as they can impact workflow completion. For example, check the WORKFLOW_MAX_EXECUTION_STEPS, WORKFLOW_MAX_EXECUTION_TIME, and other related settings in your .env file [4][5].
If these suggestions do not resolve the issue, further investigation into the specific configuration and logs of your setup might be necessary.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
In the case of using iteration:
1、I want to terminate the iteration when a certain condition is met, similar to breaking out of a loop. 2、I also want to pass the parameters from the first iteration to the start of the next iteration. How can these two requirements be implemented?
For example, I want to implement a dialectical logic workflow, but I found that there are no components available for this type of logic, which prevents me from proceeding.
Urgent Urgent Urgent
@zclcz Thank you for sharing your detailed requirements! To better address your needs, could you please create a separate issue specifically for these two points?
@icedream2linxi Thank you for reporting this issue. I've successfully tested your workflow, and it completed without any problems. However, during the initial execution, I encountered the following message:
Results are not displayed due to timeout. Please refer to the logs to gather complete results.
Could you please verify in the logs whether the workflow's status is marked as success? This information will help us better understand and resolve the issue.
@QuantumGhost Yes, it all ran successfully.
@QuantumGhost I used the cloud server version of Dify and the result was the same, the workflow could not be completed. My workflow url is https://cloud.dify.ai/app/536ab640-47ac-447b-b9f3-e2be468a8a56/workflow.
@zclcz Thank you for sharing your detailed requirements! To better address your needs, could you please create a separate issue specifically for these two points?
I tried to raise an issue, but for some reason, I am unable to submit the edited issue from my end. So, I can only comment on other people's issues. It seems like a GitHub problem. Could you please log this request? I believe this functionality would be desired by many users.
Hi, @icedream2linxi. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- The original issue involves a bug in Dify v1.0.0 when self-hosted via Docker, where workflow tasks fail to end properly when published.
- Suggested solutions included checking connection issues, execution errors, and SQLAlchemy session management, with a recommendation to upgrade to Dify v0.15.0 or later.
- You confirmed the workflow ran successfully but faced the same issue on the cloud server version.
- A related concern about iteration handling in workflows was raised and suggested to be logged separately.
Next Steps:
- Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here to keep the discussion open.
- If no updates are provided, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!
Hi, @icedream2linxi. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- The original issue involves a bug in Dify v1.0.0 when self-hosted via Docker, where workflow tasks fail to end properly when published.
- Suggested solutions included checking connection issues, execution errors, and SQLAlchemy session management, with a recommendation to upgrade to Dify v0.15.0 or later.
- You confirmed the workflow ran successfully but faced the same issue on the cloud server version.
- A related concern about iteration handling in workflows was raised and suggested to be logged separately.
Next Steps:
- Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here to keep the discussion open.
- If no updates are provided, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!
I also have this problem. When using the workflow in the workspace, if the workflow request takes too long, no result will be returned and only a timeout pop-up window will be displayed.
And it keeps showing
How to fix this problem
Hi, @icedream2linxi. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. Issue Summary:
- The original issue involves a bug in Dify v1.0.0 when self-hosted via Docker, where workflow tasks fail to end properly when published.
- Suggested solutions included checking connection issues, execution errors, and SQLAlchemy session management, with a recommendation to upgrade to Dify v0.15.0 or later.
- You confirmed the workflow ran successfully but faced the same issue on the cloud server version.
- A related concern about iteration handling in workflows was raised and suggested to be logged separately.
Next Steps:
- Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here to keep the discussion open.
- If no updates are provided, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!
I also have this problem. When using the workflow in the workspace, if the workflow request takes too long, no result will be returned and only a timeout pop-up window will be displayed.
And it keeps showing
How to fix this problem
dify version: V1.2.0
我设置的工作流,设定完成后,在后端测试都可以正常输入、输出,流程结束也可以呈现结果。 但是在发布后,到前端操作,流程结束后就不显示内容,也是提示超时,不知道原因
I am experiencing the same issue. It happens when I execute "batch run app"; some batches fail to display or save the results in the CSV sheet, even though all batches are marked as complete in the log. I have set TEXT_GENERATION_TIMEOUT_MS to 900,000 milliseconds (15 minutes), but each batch only runs for about 1 minute.
I have the same issue. When I made the iterations parallel, the execution time decreased and it became more stable.
I have the same issue.
same problem
+1
I have encountered this issue too, on version 1.4.2
Hi, @icedream2linxi. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.
Issue Summary:
- You reported that workflows in Dify v1.0.0 self-hosted via Docker complete during debugging but fail to end properly after publishing, showing a timeout and no results.
- Suggestions were made to check connection issues, configuration, and upgrade Dify, but the problem persisted even on the cloud version.
- Multiple users have confirmed similar timeout and incomplete result display issues in later versions.
- Some users found partial workarounds, such as using parallel iteration.
- The issue remains unresolved and open, with a request for confirmation if it still occurs in the latest versions.
Next Steps:
- Please confirm if this issue is still relevant with the latest version of Dify by commenting on this issue.
- If no response is received within 15 days, I will automatically close the issue.
Thank you for your understanding and contribution!
I have the same issue with V1.7.1. I tried many things without success.
同样的问题+1,Dify 1.7.1 ,修改TEXT_GENERATION_TIMEOUT_MS,GUNICORN_TIMEOUT这两个参数并没有解决