I'm encountering an error message 'Reached maximum retries (3) for URL ...' when using the HTTP request component in Dify. I haven't set any retry count manually. Why does it retry 3 times? Where is this value configured? #6073

Closed
opened 2026-02-21 18:13:57 -05:00 by yindo · 10 comments
Owner

Originally created by @Yi-Lyu on GitHub (Oct 13, 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.10.0-beta2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I'm encountering an error message 'Reached maximum retries (3) for URL ...' when using the HTTP request component in Dify.

I haven't set any retry count manually. Why does it retry 3 times? Where is this value configured?

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Yi-Lyu on GitHub (Oct 13, 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.10.0-beta2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I'm encountering an error message 'Reached maximum retries (3) for URL ...' when using the HTTP request component in Dify. I haven't set any retry count manually. Why does it retry 3 times? Where is this value configured? ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🙋‍♂️ question🤔 cant-reproduce labels 2026-02-21 18:13:57 -05:00
yindo closed this issue 2026-02-21 18:13:57 -05:00
Author
Owner

@Yi-Lyu commented on GitHub (Oct 13, 2024):

image The attached picture shows my setup
@Yi-Lyu commented on GitHub (Oct 13, 2024): <img width="450" alt="image" src="https://github.com/user-attachments/assets/d5dbbfa8-d410-4803-815d-58cd0165c765"> The attached picture shows my setup
Author
Owner

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

The error message "Reached maximum retries (3) for URL ..." indicates that the HTTP request component in Dify is set to retry a request up to three times by default. This behavior is influenced by the environment variable SSRF_DEFAULT_MAX_RETRIES [1].

If you haven't set this manually, it might be using the default configuration. You can check or modify this setting in your environment configuration to adjust the retry count.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 13, 2024): <!-- Answer --> The error message "Reached maximum retries (3) for URL ..." indicates that the HTTP request component in Dify is set to retry a request up to three times by default. This behavior is influenced by the environment variable `SSRF_DEFAULT_MAX_RETRIES` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/.env.example)</sup>. If you haven't set this manually, it might be using the default configuration. You can check or modify this setting in your environment configuration to adjust the retry count. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

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

This suggest the application is not able to access the service you provide. You need to set in the squid allow list if you are using self hosted mode.

@crazywoola commented on GitHub (Oct 14, 2024): This suggest the application is not able to access the service you provide. You need to set in the squid allow list if you are using self hosted mode.
Author
Owner

@zzw1123 commented on GitHub (Oct 16, 2024):

This suggest the application is not able to access the service you provide. You need to set in the squid allow list if you are using self hosted mode.

How to set that in the squid allow list?

@zzw1123 commented on GitHub (Oct 16, 2024): > This suggest the application is not able to access the service you provide. You need to set in the squid allow list if you are using self hosted mode. How to set that in the squid allow list?
Author
Owner

@dongwenxiao commented on GitHub (Oct 20, 2024):

I has the same err: Reached maximum retries (3) for URL ...

Now, I fixed it.

My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug.

My steps:

  1. check deploy server's docker, see the container named of ssrf_proxy
  2. find the ssrf_proxy container is not running
  3. then check the log, found the config err
  4. open ssrf_proxy config file: ./docker/ssrf_proxy/squid.conf.template and see the encode err
  5. copy https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template source to replace
  6. restart and solved

It's my path to troubleshooting the err, It may not solve everyone’s err

@dongwenxiao commented on GitHub (Oct 20, 2024): I has the same err: Reached maximum retries (3) for URL ... Now, I fixed it. My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug. My steps: 1. check deploy server's docker, see the container named of ssrf_proxy 2. find the ssrf_proxy container is not running 3. then check the log, found the config err 4. open ssrf_proxy config file: `./docker/ssrf_proxy/squid.conf.template` and see the encode err 5. copy `https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template` source to replace 6. restart and solved It's my path to troubleshooting the err, It may not solve everyone’s err
Author
Owner

@Cyron-Won commented on GitHub (Oct 23, 2024):

I has the same err: Reached maximum retries (3) for URL ...

Now, I fixed it.

My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug.

My steps:

  1. check deploy server's docker, see the container named of ssrf_proxy
  2. find the ssrf_proxy container is not running
  3. then check the log, found the config err
  4. open ssrf_proxy config file: ./docker/ssrf_proxy/squid.conf.template and see the encode err
  5. copy https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template source to replace
  6. restart and solved

It's my path to troubleshooting the err, It may not solve everyone’s err

Hi, I've encountered the same issue and I'm not sure how to resolve it. Can your method solve my problem?

image

@Cyron-Won commented on GitHub (Oct 23, 2024): > I has the same err: Reached maximum retries (3) for URL ... > > Now, I fixed it. > > My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug. > > My steps: > > 1. check deploy server's docker, see the container named of ssrf_proxy > 2. find the ssrf_proxy container is not running > 3. then check the log, found the config err > 4. open ssrf_proxy config file: `./docker/ssrf_proxy/squid.conf.template` and see the encode err > 5. copy `https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template` source to replace > 6. restart and solved > > It's my path to troubleshooting the err, It may not solve everyone’s err Hi, I've encountered the same issue and I'm not sure how to resolve it. Can your method solve my problem? ![image](https://github.com/user-attachments/assets/6ca14954-77de-499b-bbf4-676406bde23a)
Author
Owner

@TonyD0g commented on GitHub (Feb 27, 2025):

I has the same err: Reached maximum retries (3) for URL ...我有相同的错误:已达到 URL 的最大重试次数 (3) ...
Now, I fixed it. 现在,我修复了它。
My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug.我的经验:也许不是端点问题,也许是ssrf_proxy的错误。
My steps: 我的步骤:

  1. check deploy server's docker, see the container named of ssrf_proxy检查 Deploy Server 的 Docker,查看名为 ssrf_proxy 的容器
  2. find the ssrf_proxy container is not running查找 ssrf_proxy 容器未运行
  3. then check the log, found the config err然后查看日志,找到 config err
  4. open ssrf_proxy config file: ./docker/ssrf_proxy/squid.conf.template and see the encode err打开ssrf_proxy配置文件: ./docker/ssrf_proxy/squid.conf.template 并查看 Encode err
  5. copy https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template source to replace复制 https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template 源以替换
  6. restart and solved 重新启动并解决

It's my path to troubleshooting the err, It may not solve everyone’s err这是我解决错误的途径,它可能无法解决每个人的错误

Hi, I've encountered the same issue and I'm not sure how to resolve it. Can your method solve my problem?嗨,我遇到了同样的问题,但我不确定如何解决它。您的方法能解决我的问题吗?

image

My environment:

  1. Local docker deployment dify
  2. Use custom tools

Solution:
In the schema of the custom tool, the requested path cannot be 127.0.0.1, such as http://127.0.0.1:4397
You can replace it with an intranet address, such as http://10.0.88.198:4397
Or use the following method: http://host.docker.internal:4397

我的环境:
1.本地docker部署dify
2.使用了自定义工具

解决方法:
自定义工具的schema中,请求的路径不能为127.0.0.1,比如http://127.0.0.1:4397
你可以替换为内网地址,比如http://10.0.88.198:4397
再或者使用如下方法:http://host.docker.internal:4397

@TonyD0g commented on GitHub (Feb 27, 2025): > > I has the same err: Reached maximum retries (3) for URL ...我有相同的错误:已达到 URL 的最大重试次数 (3) ... > > Now, I fixed it. 现在,我修复了它。 > > My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug.我的经验:也许不是端点问题,也许是ssrf_proxy的错误。 > > My steps: 我的步骤: > > > > 1. check deploy server's docker, see the container named of ssrf_proxy检查 Deploy Server 的 Docker,查看名为 ssrf_proxy 的容器 > > 2. find the ssrf_proxy container is not running查找 ssrf_proxy 容器未运行 > > 3. then check the log, found the config err然后查看日志,找到 config err > > 4. open ssrf_proxy config file: `./docker/ssrf_proxy/squid.conf.template` and see the encode err打开ssrf_proxy配置文件: `./docker/ssrf_proxy/squid.conf.template` 并查看 Encode err > > 5. copy `https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template` source to replace复制 `https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template` 源以替换 > > 6. restart and solved 重新启动并解决 > > > > It's my path to troubleshooting the err, It may not solve everyone’s err这是我解决错误的途径,它可能无法解决每个人的错误 > > Hi, I've encountered the same issue and I'm not sure how to resolve it. Can your method solve my problem?嗨,我遇到了同样的问题,但我不确定如何解决它。您的方法能解决我的问题吗? > > ![image](https://github.com/user-attachments/assets/6ca14954-77de-499b-bbf4-676406bde23a) My environment: 1. Local docker deployment dify 2. Use custom tools Solution: In the schema of the custom tool, the requested path cannot be 127.0.0.1, such as http://127.0.0.1:4397 You can replace it with an intranet address, such as http://10.0.88.198:4397 Or use the following method: http://host.docker.internal:4397 我的环境: 1.本地docker部署dify 2.使用了自定义工具 解决方法: 自定义工具的schema中,请求的路径不能为127.0.0.1,比如http://127.0.0.1:4397 你可以替换为内网地址,比如http://10.0.88.198:4397 再或者使用如下方法:http://host.docker.internal:4397
Author
Owner

@JunyiXiang commented on GitHub (Mar 24, 2025):

I has the same err: Reached maximum retries (3) for URL ...我有相同的错误:已达到 URL 的最大重试次数 (3) ...
Now, I fixed it. 现在,我修复了它。
My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug.我的经验:也许不是端点问题,也许是ssrf_proxy的错误。
My steps: 我的步骤:

  1. check deploy server's docker, see the container named of ssrf_proxy检查 Deploy Server 的 Docker,查看名为 ssrf_proxy 的容器
  2. find the ssrf_proxy container is not running查找 ssrf_proxy 容器未运行
  3. then check the log, found the config err然后查看日志,找到 config err
  4. open ssrf_proxy config file: ./docker/ssrf_proxy/squid.conf.template and see the encode err打开ssrf_proxy配置文件: ./docker/ssrf_proxy/squid.conf.template 并查看 Encode err
  5. copy https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template source to replace复制 https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template 源以替换
  6. restart and solved 重新启动并解决

It's my path to troubleshooting the err, It may not solve everyone’s err这是我解决错误的途径,它可能无法解决每个人的错误

Hi, I've encountered the same issue and I'm not sure how to resolve it. Can your method solve my problem?嗨,我遇到了同样的问题,但我不确定如何解决它。您的方法能解决我的问题吗?
image

My environment:

  1. Local docker deployment dify
  2. Use custom tools

Solution: In the schema of the custom tool, the requested path cannot be 127.0.0.1, such as http://127.0.0.1:4397 You can replace it with an intranet address, such as http://10.0.88.198:4397 Or use the following method: http://host.docker.internal:4397

我的环境: 1.本地docker部署dify 2.使用了自定义工具

解决方法: 自定义工具的schema中,请求的路径不能为127.0.0.1,比如http://127.0.0.1:4397 你可以替换为内网地址,比如http://10.0.88.198:4397 再或者使用如下方法:http://host.docker.internal:4397

真帮大忙了 谢谢你!
我也说下我自己遇到的问题吧
我的环境: 1.本地docker部署dify 2.想使用dify工作流通过api调整本地部署的dify知识库
错误代码:使用https代码块,Reached maximum retries (0) for URL http://localhost/v1/datasets/
解决方法:把localhost改成host.docker.internal

Environment

  1. Local Docker deployment of Dify
  2. Trying to use Dify workflow via API to adjust locally deployed Dify knowledge base
    Error Message
    Reached maximum retries (0) for URL http://localhost/v1/datasets/
    Solution
    Replace localhost with host.docker.internal
@JunyiXiang commented on GitHub (Mar 24, 2025): > > > I has the same err: Reached maximum retries (3) for URL ...我有相同的错误:已达到 URL 的最大重试次数 (3) ... > > > Now, I fixed it. 现在,我修复了它。 > > > My experience: Maybe not endpoint problem, maybe ssrf_proxy's bug.我的经验:也许不是端点问题,也许是ssrf_proxy的错误。 > > > My steps: 我的步骤: > > > > > > 1. check deploy server's docker, see the container named of ssrf_proxy检查 Deploy Server 的 Docker,查看名为 ssrf_proxy 的容器 > > > 2. find the ssrf_proxy container is not running查找 ssrf_proxy 容器未运行 > > > 3. then check the log, found the config err然后查看日志,找到 config err > > > 4. open ssrf_proxy config file: `./docker/ssrf_proxy/squid.conf.template` and see the encode err打开ssrf_proxy配置文件: `./docker/ssrf_proxy/squid.conf.template` 并查看 Encode err > > > 5. copy `https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template` source to replace复制 `https://github.com/langgenius/dify/blob/main/docker/ssrf_proxy/squid.conf.template` 源以替换 > > > 6. restart and solved 重新启动并解决 > > > > > > It's my path to troubleshooting the err, It may not solve everyone’s err这是我解决错误的途径,它可能无法解决每个人的错误 > > > > > > Hi, I've encountered the same issue and I'm not sure how to resolve it. Can your method solve my problem?嗨,我遇到了同样的问题,但我不确定如何解决它。您的方法能解决我的问题吗? > > ![image](https://github.com/user-attachments/assets/6ca14954-77de-499b-bbf4-676406bde23a) > > My environment: > > 1. Local docker deployment dify > 2. Use custom tools > > Solution: In the schema of the custom tool, the requested path cannot be 127.0.0.1, such as http://127.0.0.1:4397 You can replace it with an intranet address, such as http://10.0.88.198:4397 Or use the following method: http://host.docker.internal:4397 > > 我的环境: 1.本地docker部署dify 2.使用了自定义工具 > > 解决方法: 自定义工具的schema中,请求的路径不能为127.0.0.1,比如http://127.0.0.1:4397 你可以替换为内网地址,比如http://10.0.88.198:4397 再或者使用如下方法:http://host.docker.internal:4397 真帮大忙了 谢谢你! 我也说下我自己遇到的问题吧 我的环境: 1.本地docker部署dify 2.想使用dify工作流通过api调整本地部署的dify知识库 错误代码:使用https代码块,Reached maximum retries (0) for URL http://localhost/v1/datasets/ 解决方法:把localhost改成host.docker.internal **Environment** 1. Local Docker deployment of Dify 2. Trying to use Dify workflow via API to adjust locally deployed Dify knowledge base **Error Message** Reached maximum retries (0) for URL http://localhost/v1/datasets/ **Solution** Replace localhost with host.docker.internal
Author
Owner

@chjiyun commented on GitHub (Mar 26, 2025):

TCP_MISS_TIMEDOUT/503 4362 GET http://xm.test.js.tqmdp.net:8888/api/client/ext/project-info? - HIER_DIRECT/47.97.35.212 text/html
为什么会出现这个错误呢,试了上面的方法都不行,dify 0.15.3

@chjiyun commented on GitHub (Mar 26, 2025): TCP_MISS_TIMEDOUT/503 4362 GET http://xm.test.js.tqmdp.net:8888/api/client/ext/project-info? - HIER_DIRECT/47.97.35.212 text/html 为什么会出现这个错误呢,试了上面的方法都不行,dify 0.15.3
Author
Owner

@chjiyun commented on GitHub (Mar 26, 2025):

TCP_MISS_TIMEDOUT/503 4362 GET http://xm.test.js.tqmdp.net:8888/api/client/ext/project-info? - HIER_DIRECT/47.97.35.212 text/html 为什么会出现这个错误呢,试了上面的方法都不行,dify 0.15.3

解决了, 是版本的问题,在我自己电脑上装最新版就不报错了,-_-

@chjiyun commented on GitHub (Mar 26, 2025): > TCP_MISS_TIMEDOUT/503 4362 GET http://xm.test.js.tqmdp.net:8888/api/client/ext/project-info? - HIER_DIRECT/47.97.35.212 text/html 为什么会出现这个错误呢,试了上面的方法都不行,dify 0.15.3 解决了, 是版本的问题,在我自己电脑上装最新版就不报错了,-_-
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6073