hit testing giving time out error #7798

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

Originally created by @qadeerikram-art on GitHub (Jan 20, 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

0.11.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Go to any knowledgebase retrieval testing and hit testing button. if hit-testing api takes more than 5 seconds it will give timed out error.

✔️ Expected Behavior

It should not give error

Actual Behavior

Hit testing api giving timedout error

Originally created by @qadeerikram-art on GitHub (Jan 20, 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 0.11.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Go to any knowledgebase retrieval testing and hit testing button. if hit-testing api takes more than 5 seconds it will give timed out error. ### ✔️ Expected Behavior It should not give error ### ❌ Actual Behavior Hit testing api giving timedout error
yindo added the 🐞 bug label 2026-02-21 18:22:26 -05:00
yindo closed this issue 2026-02-21 18:22:26 -05:00
Author
Owner

@qadeerikram-art commented on GitHub (Jan 20, 2025):

@dosu why hit-testing endpoint is giving error after 5 seconds. Is there any key in dify that i have to update ?

@qadeerikram-art commented on GitHub (Jan 20, 2025): @dosu why hit-testing endpoint is giving error after 5 seconds. Is there any key in dify that i have to update ?
Author
Owner

@dosubot[bot] commented on GitHub (Jan 20, 2025):

A similar issue was previously reported and resolved by adjusting the timeout settings in the Dify configuration. You need to manually add and configure the following environment variables, as they are not defined in docker/.env.example or docker-compose.yaml:

  • SSRF_DEFAULT_TIME_OUT
  • SSRF_DEFAULT_CONNECT_TIME_OUT
  • SSRF_DEFAULT_READ_TIME_OUT
  • SSRF_DEFAULT_WRITE_TIME_OUT
  • HTTP_REQUEST_MAX_CONNECT_TIMEOUT
  • HTTP_REQUEST_MAX_READ_TIMEOUT
  • HTTP_REQUEST_MAX_WRITE_TIMEOUT

Definitions and default values can be found in api/.env.example. Adjust these settings to ensure they are set to a duration longer than your request takes to complete [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 20, 2025): <!-- Answer --> A similar issue was previously reported and resolved by adjusting the timeout settings in the Dify configuration. You need to manually add and configure the following environment variables, as they are not defined in `docker/.env.example` or `docker-compose.yaml`: - `SSRF_DEFAULT_TIME_OUT` - `SSRF_DEFAULT_CONNECT_TIME_OUT` - `SSRF_DEFAULT_READ_TIME_OUT` - `SSRF_DEFAULT_WRITE_TIME_OUT` - `HTTP_REQUEST_MAX_CONNECT_TIMEOUT` - `HTTP_REQUEST_MAX_READ_TIMEOUT` - `HTTP_REQUEST_MAX_WRITE_TIMEOUT` Definitions and default values can be found in `api/.env.example`. Adjust these settings to ensure they are set to a duration longer than your request takes to complete <sup>[[1]](https://github.com/langgenius/dify/issues/10618)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9c403480-59c8-4896-b04d-4544cd60fa70?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9c403480-59c8-4896-b04d-4544cd60fa70?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9c403480-59c8-4896-b04d-4544cd60fa70?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9c403480-59c8-4896-b04d-4544cd60fa70?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9c403480-59c8-4896-b04d-4544cd60fa70?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/9c403480-59c8-4896-b04d-4544cd60fa70?feedback_type=other)</sup>
Author
Owner

@qadeerikram-art commented on GitHub (Jan 20, 2025):

@Dosu in env example it's value is 600. what's meaning of this
HTTP_REQUEST_MAX_READ_TIMEOUT=600
HTTP_REQUEST_MAX_WRITE_TIMEOUT=600

@qadeerikram-art commented on GitHub (Jan 20, 2025): @Dosu in env example it's value is 600. what's meaning of this HTTP_REQUEST_MAX_READ_TIMEOUT=600 HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
Author
Owner

@qadeerikram-art commented on GitHub (Jan 20, 2025):

@dosu in env example it's value is 600. what's meaning of this
HTTP_REQUEST_MAX_READ_TIMEOUT=600
HTTP_REQUEST_MAX_WRITE_TIMEOUT=600

@qadeerikram-art commented on GitHub (Jan 20, 2025): @dosu in env example it's value is 600. what's meaning of this HTTP_REQUEST_MAX_READ_TIMEOUT=600 HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
Author
Owner

@dosubot[bot] commented on GitHub (Jan 20, 2025):

The value of 600 for HTTP_REQUEST_MAX_READ_TIMEOUT and HTTP_REQUEST_MAX_WRITE_TIMEOUT represents the timeout duration in seconds. This means the maximum time allowed for reading from or writing to a request is 600 seconds (or 10 minutes). If your requests are timing out after 5 seconds, you might want to ensure these values are correctly set in your environment configuration to allow for longer processing times.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 20, 2025): <!-- Answer --> The value of `600` for `HTTP_REQUEST_MAX_READ_TIMEOUT` and `HTTP_REQUEST_MAX_WRITE_TIMEOUT` represents the timeout duration in seconds. This means the maximum time allowed for reading from or writing to a request is 600 seconds (or 10 minutes). If your requests are timing out after 5 seconds, you might want to ensure these values are correctly set in your environment configuration to allow for longer processing times. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/fd806bbf-6f7e-496e-bcdb-a1c2d466535c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/fd806bbf-6f7e-496e-bcdb-a1c2d466535c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/fd806bbf-6f7e-496e-bcdb-a1c2d466535c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/fd806bbf-6f7e-496e-bcdb-a1c2d466535c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fd806bbf-6f7e-496e-bcdb-a1c2d466535c?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/fd806bbf-6f7e-496e-bcdb-a1c2d466535c?feedback_type=other)</sup>
Author
Owner

@qadeerikram-art commented on GitHub (Jan 20, 2025):

@dosu I have only env.example file. I don't have .env file. will dify auto set value for HTTP_REQUEST_MAX_WRITE_TIMEOUT ?

@qadeerikram-art commented on GitHub (Jan 20, 2025): @dosu I have only env.example file. I don't have .env file. will dify auto set value for HTTP_REQUEST_MAX_WRITE_TIMEOUT ?
Author
Owner

@dosubot[bot] commented on GitHub (Jan 20, 2025):

Dify does not automatically use values from the env.example file if a .env file is not present. You need to manually create a .env file by copying the env.example file and then customize it as needed. You can do this by running the following command in your terminal:

cp .env.example .env

After creating the .env file, you can set the HTTP_REQUEST_MAX_WRITE_TIMEOUT and any other necessary environment variables to your desired values [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 20, 2025): <!-- Answer --> Dify does not automatically use values from the `env.example` file if a `.env` file is not present. You need to manually create a `.env` file by copying the `env.example` file and then customize it as needed. You can do this by running the following command in your terminal: ```bash cp .env.example .env ``` After creating the `.env` file, you can set the `HTTP_REQUEST_MAX_WRITE_TIMEOUT` and any other necessary environment variables to your desired values <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/README.md)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/docker/README.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/f3b717d7-4599-4945-8e93-3556927baa3c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f3b717d7-4599-4945-8e93-3556927baa3c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f3b717d7-4599-4945-8e93-3556927baa3c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f3b717d7-4599-4945-8e93-3556927baa3c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f3b717d7-4599-4945-8e93-3556927baa3c?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/f3b717d7-4599-4945-8e93-3556927baa3c?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Jan 20, 2025):

Changing logo requires our business license, please contact our business support via email business@dify.ai, otherwise we will take legal actions on this behavior according to our open source license.

@crazywoola commented on GitHub (Jan 20, 2025): Changing logo requires our business license, please contact our business support via email business@dify.ai, otherwise we will take legal actions on this behavior according to our open source license.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7798