Xinference Request timed out #143

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

Originally created by @yumu7777777 on GitHub (Mar 28, 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

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When adding the Xinference model, a timeout prompt appears. I can access Xinference normally on the interface. Could you please tell me what the cause is? Dify is deployed on an internal network, and so is Xinference. A policy has been set up between the two servers to ensure connectivity.
Image

✔️ Expected Behavior

Add the model successfully.

Actual Behavior

Request timed out

Originally created by @yumu7777777 on GitHub (Mar 28, 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 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When adding the Xinference model, a timeout prompt appears. I can access Xinference normally on the interface. Could you please tell me what the cause is? Dify is deployed on an internal network, and so is Xinference. A policy has been set up between the two servers to ensure connectivity. ![Image](https://github.com/user-attachments/assets/18411aec-c726-44c5-9050-f0c76b033c15) ### ✔️ Expected Behavior Add the model successfully. ### ❌ Actual Behavior Request timed out
yindo closed this issue 2026-02-16 10:18:13 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 28, 2025):

There are several similar threads related to timeout issues when using Xinference with Dify:

  1. What is the reason for the request timed out when saving the model? - This discussion is open and suggests checking the timeout settings in the api/core/tools/custom_tool/tool.py file and ensuring network stability. Adjusting the timeout values might help [1].

  2. Run failed: [models] Connection Error, HTTPConnectionPool(host='172.26.27.223', port=11434): Read timed out. (read timeout=300) - This open discussion suggests ensuring the Dify container can access the Xinference endpoint by using the host IP address instead of localhost and checking firewall settings [2].

  3. connection error: request error, status_code: 503 - This open discussion also highlights the importance of using the correct IP address and ensuring network connectivity [3].

To resolve your issue, ensure that the Dify container can access the Xinference endpoint by using the host machine's IP address instead of localhost. Additionally, verify that the network policy between the two servers is correctly configured and that there are no firewall restrictions blocking the connection. Adjusting the timeout settings in the Dify configuration might also help.

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

@dosubot[bot] commented on GitHub (Mar 28, 2025): <!-- Answer --> There are several similar threads related to timeout issues when using Xinference with Dify: 1. **[What is the reason for the request timed out when saving the model?](https://github.com/langgenius/dify/discussions/14017)** - This discussion is open and suggests checking the timeout settings in the `api/core/tools/custom_tool/tool.py` file and ensuring network stability. Adjusting the timeout values might help <sup>[[1]](https://github.com/langgenius/dify/discussions/14017)</sup>. 2. **[Run failed: [models] Connection Error, HTTPConnectionPool(host='172.26.27.223', port=11434): Read timed out. (read timeout=300)](https://github.com/langgenius/dify/discussions/16116)** - This open discussion suggests ensuring the Dify container can access the Xinference endpoint by using the host IP address instead of `localhost` and checking firewall settings <sup>[[2]](https://github.com/langgenius/dify/discussions/16116)</sup>. 3. **[connection error: request error, status_code: 503](https://github.com/langgenius/dify/discussions/6181)** - This open discussion also highlights the importance of using the correct IP address and ensuring network connectivity <sup>[[3]](https://github.com/langgenius/dify/discussions/6181)</sup>. To resolve your issue, ensure that the Dify container can access the Xinference endpoint by using the host machine's IP address instead of `localhost`. Additionally, verify that the network policy between the two servers is correctly configured and that there are no firewall restrictions blocking the connection. Adjusting the timeout settings in the Dify configuration might also help. <!-- 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/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f7cf348f-30de-4067-96ca-2cc0a044fcf8?feedback_type=other)</sup>
Author
Owner

@yumu7777777 commented on GitHub (Mar 28, 2025):

Will Dify access the Internet when adding an offline model?

@yumu7777777 commented on GitHub (Mar 28, 2025): Will Dify access the Internet when adding an offline model?
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @yumu7777777. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a timeout error when adding a Xinference model in Dify v1.1.3 self-hosted via Docker.
  • Xinference is accessible, and network policies appear to allow connectivity.
  • Suggestions included checking timeout settings, using the host IP instead of localhost, and verifying network/firewall configurations.
  • You inquired whether Dify requires Internet access when adding an offline model.
  • The issue remains unresolved with ongoing troubleshooting.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here.
  • If no further updates are provided, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @yumu7777777. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a timeout error when adding a Xinference model in Dify v1.1.3 self-hosted via Docker. - Xinference is accessible, and network policies appear to allow connectivity. - Suggestions included checking timeout settings, using the host IP instead of localhost, and verifying network/firewall configurations. - You inquired whether Dify requires Internet access when adding an offline model. - The issue remains unresolved with ongoing troubleshooting. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of dify-official-plugins by commenting here. - If no further updates are provided, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#143