Workflows that need a long time to produce output time out #6088

Closed
opened 2026-02-21 18:14:02 -05:00 by yindo · 8 comments
Owner

Originally created by @infinitnet on GitHub (Oct 14, 2024).

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

0.9.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When running a workflow as an app, if the workflow takes a long time to stream output, it times out and the workflow output is only accessible through workflow logs. This is an issue with workflows that need a long execution time before they produce output.

✔️ Expected Behavior

It should be possible to get output from workflows that take a long time to send output. Long and complex loops, data processing, etc can take time.

Actual Behavior

Instead of output, there's an error message that the workflow timed out and the output is only accessible through workflow logs.

Originally created by @infinitnet on GitHub (Oct 14, 2024). ### 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 0.9.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When running a workflow as an app, if the workflow takes a long time to stream output, it times out and the workflow output is only accessible through workflow logs. This is an issue with workflows that need a long execution time before they produce output. ### ✔️ Expected Behavior It should be possible to get output from workflows that take a long time to send output. Long and complex loops, data processing, etc can take time. ### ❌ Actual Behavior Instead of output, there's an error message that the workflow timed out and the output is only accessible through workflow logs.
yindo added the 🌊 feat:workflow label 2026-02-21 18:14:02 -05:00
yindo closed this issue 2026-02-21 18:14:02 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 14, 2024):

I found some similar discussions and issues related to workflow timeouts in Dify:

  1. A solved discussion titled Code Execution run failed: error: timeout error: signal: killed suggests adjusting the WORKER_TIMEOUT setting in the sandbox to resolve timeout issues [1].

  2. An unsolved discussion titled Common timeout settings in Workflow might provide additional insights [2].

  3. Another unsolved discussion, How to adjust the read timeout parameter and extend it to 600, discusses adjusting timeout parameters [3].

  4. A closed issue, App times out that does not display output, suggests ensuring that the component responsible for displaying logs handles long text properly. This involves checking the Markdown component and possibly adjusting CSS styles to handle overflow and scrolling [4].

To address your specific issue, you can try adjusting the WORKER_TIMEOUT setting in the docker-compose.yaml file. Modify the SANDBOX_WORKER_TIMEOUT environment variable to a higher value to increase the timeout duration. For example, change the default value from 15 to 30 seconds or more, depending on your needs [5].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 14, 2024): <!-- Answer --> I found some similar discussions and issues related to workflow timeouts in Dify: 1. A solved discussion titled [Code Execution run failed: error: timeout error: signal: killed](https://github.com/langgenius/dify/discussions/7274#discussioncomment-10416890) suggests adjusting the `WORKER_TIMEOUT` setting in the sandbox to resolve timeout issues <sup>[[1]](https://github.com/langgenius/dify/discussions/7274)</sup>. 2. An unsolved discussion titled [Common timeout settings in Workflow](https://github.com/langgenius/dify/discussions/6681) might provide additional insights <sup>[[2]](https://github.com/langgenius/dify/discussions/6681)</sup>. 3. Another unsolved discussion, [How to adjust the read timeout parameter and extend it to 600](https://github.com/langgenius/dify/discussions/5201), discusses adjusting timeout parameters <sup>[[3]](https://github.com/langgenius/dify/discussions/5201)</sup>. 4. A closed issue, [App times out that does not display output](https://github.com/langgenius/dify/issues/6256), suggests ensuring that the component responsible for displaying logs handles long text properly. This involves checking the `Markdown` component and possibly adjusting CSS styles to handle overflow and scrolling <sup>[[4]](https://github.com/langgenius/dify/issues/6256)</sup>. To address your specific issue, you can try adjusting the `WORKER_TIMEOUT` setting in the `docker-compose.yaml` file. Modify the `SANDBOX_WORKER_TIMEOUT` environment variable to a higher value to increase the timeout duration. For example, change the default value from 15 to 30 seconds or more, depending on your needs <sup>[[5]](https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Oct 14, 2024):

Try to set this environment variable
https://github.com/langgenius/dify/blob/d15ba3939d39c14fd52cd2566bc3bf04cdf5f1f2/docker/docker-compose.yaml#L276

@crazywoola commented on GitHub (Oct 14, 2024): Try to set this environment variable https://github.com/langgenius/dify/blob/d15ba3939d39c14fd52cd2566bc3bf04cdf5f1f2/docker/docker-compose.yaml#L276
Author
Owner

@infinitnet commented on GitHub (Oct 15, 2024):

Try to set this environment variable

https://github.com/langgenius/dify/blob/d15ba3939d39c14fd52cd2566bc3bf04cdf5f1f2/docker/docker-compose.yaml#L276

This makes the error message disappear, but the output canvas still stays empty after the workflow finished and does out display the output and the "Workflow process" gear icon also keeps spinning while the output is only visible in the logs with "Max execution time 1200s reached.".

Screenshot at Oct 15 08-42-31
@infinitnet commented on GitHub (Oct 15, 2024): > Try to set this environment variable > > https://github.com/langgenius/dify/blob/d15ba3939d39c14fd52cd2566bc3bf04cdf5f1f2/docker/docker-compose.yaml#L276 This makes the error message disappear, but the output canvas still stays empty after the workflow finished and does out display the output and the "Workflow process" gear icon also keeps spinning while the output is only visible in the logs with "Max execution time 1200s reached.". <img width="1233" alt="Screenshot at Oct 15 08-42-31" src="https://github.com/user-attachments/assets/9322020e-2c32-4e49-8f24-87ea3393f9f6">
Author
Owner

@infinitnet commented on GitHub (Oct 15, 2024):

WORKFLOW_MAX_EXECUTION_TIME seems to be the right setting.

@infinitnet commented on GitHub (Oct 15, 2024): `WORKFLOW_MAX_EXECUTION_TIME` seems to be the right setting.
Author
Owner

@clickflow1 commented on GitHub (Feb 12, 2025):

WORKFLOW_MAX_EXECUTION_TIME seems to be the right setting.

Did it work in your case?

@clickflow1 commented on GitHub (Feb 12, 2025): > `WORKFLOW_MAX_EXECUTION_TIME` seems to be the right setting. Did it work in your case?
Author
Owner

@infinitnet commented on GitHub (Feb 12, 2025):

WORKFLOW_MAX_EXECUTION_TIME seems to be the right setting.

Did it work in your case?

Yes, but I also increased TEXT_GENERATION_TIMEOUT_MS together with WORKFLOW_MAX_EXECUTION_TIME

@infinitnet commented on GitHub (Feb 12, 2025): > > `WORKFLOW_MAX_EXECUTION_TIME` seems to be the right setting. > > Did it work in your case? Yes, but I also increased `TEXT_GENERATION_TIMEOUT_MS` together with `WORKFLOW_MAX_EXECUTION_TIME`
Author
Owner

@shengxianli commented on GitHub (Mar 18, 2025):

WORKFLOW_MAX_EXECUTION_TIME似乎是正确的设置。

就你的情况来说它有用吗?

是的,但我也增加TEXT_GENERATION_TIMEOUT_MSWORKFLOW_MAX_EXECUTION_TIME

I adjusted the WORKER-TIMEOUT of the. evn and docker-compose.yaml file to 180, but it doesn't seem to work
I am using Docker Compose deployment, what do I need to do after modifying it

@shengxianli commented on GitHub (Mar 18, 2025): > > > `WORKFLOW_MAX_EXECUTION_TIME`似乎是正确的设置。 > > > > > > 就你的情况来说它有用吗? > > 是的,但我也增加`TEXT_GENERATION_TIMEOUT_MS`了`WORKFLOW_MAX_EXECUTION_TIME` I adjusted the WORKER-TIMEOUT of the. evn and docker-compose.yaml file to 180, but it doesn't seem to work I am using Docker Compose deployment, what do I need to do after modifying it
Author
Owner

@wushenggui137 commented on GitHub (Jul 17, 2025):

I meet the same problem with you,it need to restart your Docker containers to apply the new settings:
docker compose stop
docker compose up -d

@wushenggui137 commented on GitHub (Jul 17, 2025): I meet the same problem with you,it need to restart your Docker containers to apply the new settings: docker compose stop docker compose up -d
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6088