webapp not response #5047

Closed
opened 2026-02-21 18:09:09 -05:00 by yindo · 6 comments
Owner

Originally created by @walkbird on GitHub (Aug 15, 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.7.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Select a workflow, enter the corresponding webapp page, input the content, and wait for the workflow to finish running.
  2. In the initial testing, if the runtime exceeds 1 minute, such as 65 seconds, the results will not be displayed on the interface. However, if it finishes within 5 seconds, the results will be displayed normally.
  3. Please refer to the screenshot I provided for detailed information.

No Output
no_output

With Output
with_output

delay_output.yml.zip

✔️ Expected Behavior

Regardless of the duration, the results will return normally. Sometimes, the LLM may require more time to process.

Actual Behavior

When the duration is approximately longer than 1 minute, the results will not be displayed.

Originally created by @walkbird on GitHub (Aug 15, 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.7.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Select a workflow, enter the corresponding webapp page, input the content, and wait for the workflow to finish running. 2. In the initial testing, if the runtime exceeds 1 minute, such as 65 seconds, the results will not be displayed on the interface. However, if it finishes within 5 seconds, the results will be displayed normally. 3. Please refer to the screenshot I provided for detailed information. No Output ![no_output](https://github.com/user-attachments/assets/cc4423ce-6b42-4ef2-b353-b3c2bedabd10) With Output ![with_output](https://github.com/user-attachments/assets/d8d3f7da-a682-467a-8ef6-c860edc75cdc) [delay_output.yml.zip](https://github.com/user-attachments/files/16621800/delay_output.yml.zip) ### ✔️ Expected Behavior Regardless of the duration, the results will return normally. Sometimes, the LLM may require more time to process. ### ❌ Actual Behavior When the duration is approximately longer than 1 minute, the results will not be displayed.
yindo added the 🐞 bug label 2026-02-21 18:09:09 -05:00
yindo closed this issue 2026-02-21 18:09:09 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 15, 2024):

Hello, @walkbird! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's tackle this issue together!

To resolve the issue where your self-hosted web application (version 0.7.0, running on Docker) becomes unresponsive and fails to display results when a workflow takes longer than 1 minute to complete, you need to adjust the timeout settings. The current timeout is set by TEXT_GENERATION_TIMEOUT_MS.

In the provided code, the timeout is managed by the following snippet:

let isTimeout = false;
(async () => {
  await sleep(TEXT_GENERATION_TIMEOUT_MS)
  if (!isEnd) {
    setRespondingFalse()
    onCompleted(getCompletionRes(), taskId, false)
    isTimeout = true
  }
})()

To increase the timeout duration, you need to change the value of TEXT_GENERATION_TIMEOUT_MS in your configuration file. For example, if you want to increase the timeout to 5 minutes (300,000 milliseconds), you can set TEXT_GENERATION_TIMEOUT_MS to 300000.

const TEXT_GENERATION_TIMEOUT_MS = 300000; // 5 minutes

Make sure to update this value in your configuration file and redeploy your application. Additionally, if you are using the blocking mode for workflow execution, be aware that due to Cloudflare restrictions, the request will be interrupted without a return after 100 seconds. To avoid this, consider using the streaming response mode, which implements a typewriter-like output through Server-Sent Events (SSE).

{
  "inputs": {},
  "response_mode": "streaming",
  "user": "abc-123"
}

This should help in resolving the issue of the application becoming unresponsive for workflows that take longer than 1 minute to complete [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 15, 2024): <!-- Greeting --> Hello, @walkbird! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's tackle this issue together! <!-- Answer --> To resolve the issue where your self-hosted web application (version 0.7.0, running on Docker) becomes unresponsive and fails to display results when a workflow takes longer than 1 minute to complete, you need to adjust the timeout settings. The current timeout is set by `TEXT_GENERATION_TIMEOUT_MS`. In the provided code, the timeout is managed by the following snippet: ```tsx let isTimeout = false; (async () => { await sleep(TEXT_GENERATION_TIMEOUT_MS) if (!isEnd) { setRespondingFalse() onCompleted(getCompletionRes(), taskId, false) isTimeout = true } })() ``` To increase the timeout duration, you need to change the value of `TEXT_GENERATION_TIMEOUT_MS` in your configuration file. For example, if you want to increase the timeout to 5 minutes (300,000 milliseconds), you can set `TEXT_GENERATION_TIMEOUT_MS` to 300000. ```tsx const TEXT_GENERATION_TIMEOUT_MS = 300000; // 5 minutes ``` Make sure to update this value in your configuration file and redeploy your application. Additionally, if you are using the blocking mode for workflow execution, be aware that due to Cloudflare restrictions, the request will be interrupted without a return after 100 seconds. To avoid this, consider using the `streaming` response mode, which implements a typewriter-like output through Server-Sent Events (SSE). ```json { "inputs": {}, "response_mode": "streaming", "user": "abc-123" } ``` This should help in resolving the issue of the application becoming unresponsive for workflows that take longer than 1 minute to complete <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/share/text-generation/result/index.tsx)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template_workflow.en.mdx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Aug 15, 2024):

This is a known issue, we have a limit of 60s in frontend. We will adjust it later. https://github.com/langgenius/dify/commit/a5fcd91ba5e669806672de54a3be62f0bb2eeea8

@crazywoola commented on GitHub (Aug 15, 2024): This is a known issue, we have a limit of 60s in frontend. We will adjust it later. https://github.com/langgenius/dify/commit/a5fcd91ba5e669806672de54a3be62f0bb2eeea8
Author
Owner

@libukai commented on GitHub (Aug 15, 2024):

It's because of this reason, it has been bothering me for a long time, so many complex processes cannot be executed in this case. I hope for a quick adjustment.

@libukai commented on GitHub (Aug 15, 2024): It's because of this reason, it has been bothering me for a long time, so many complex processes cannot be executed in this case. I hope for a quick adjustment.
Author
Owner

@walkbird commented on GitHub (Aug 15, 2024):

I temporarily resolved this issue by modifying the TEXT_GENERATION_TIMEOUT_MS configuration in the web/config/index.ts file and then rebuilding a Docker image. Maybe in the future, we could move the TEXT_GENERATION_TIMEOUT_MS parameter to the .env configuration?

Here is my modification:

dify % git diff
diff --git a/web/config/index.ts b/web/config/index.ts
index 6b0e551e3..084a6738d 100644
--- a/web/config/index.ts
+++ b/web/config/index.ts
@@ -246,4 +246,4 @@ Thought: {{agent_scratchpad}}

 export const VAR_REGEX = /\{\{(#[a-zA-Z0-9_-]{1,50}(\.[a-zA-Z_][a-zA-Z0-9_]{0,29}){1,10}#)\}\}/gi

-export const TEXT_GENERATION_TIMEOUT_MS = 60000
+export const TEXT_GENERATION_TIMEOUT_MS = 3600000
@walkbird commented on GitHub (Aug 15, 2024): I temporarily resolved this issue by modifying the TEXT_GENERATION_TIMEOUT_MS configuration in the web/config/index.ts file and then rebuilding a Docker image. Maybe in the future, we could move the TEXT_GENERATION_TIMEOUT_MS parameter to the .env configuration? Here is my modification: ```shell dify % git diff diff --git a/web/config/index.ts b/web/config/index.ts index 6b0e551e3..084a6738d 100644 --- a/web/config/index.ts +++ b/web/config/index.ts @@ -246,4 +246,4 @@ Thought: {{agent_scratchpad}} export const VAR_REGEX = /\{\{(#[a-zA-Z0-9_-]{1,50}(\.[a-zA-Z_][a-zA-Z0-9_]{0,29}){1,10}#)\}\}/gi -export const TEXT_GENERATION_TIMEOUT_MS = 60000 +export const TEXT_GENERATION_TIMEOUT_MS = 3600000 ```
Author
Owner

@libukai commented on GitHub (Aug 21, 2024):

This is a known issue, we have a limit of 60s in frontend. We will adjust it later. a5fcd91

Is there a specific version plan for the fix?

@libukai commented on GitHub (Aug 21, 2024): > This is a known issue, we have a limit of 60s in frontend. We will adjust it later. [a5fcd91](https://github.com/langgenius/dify/commit/a5fcd91ba5e669806672de54a3be62f0bb2eeea8) Is there a specific version plan for the fix?
Author
Owner

@shuai-huaman commented on GitHub (Apr 8, 2025):

If it is a cloud service, how to modify this timeout period?

@shuai-huaman commented on GitHub (Apr 8, 2025): If it is a cloud service, how to modify this timeout period?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5047