Requests timeout (read timeout) #692

Closed
opened 2026-02-21 17:28:03 -05:00 by yindo · 1 comment
Owner

Originally created by @WrunDorry on GitHub (Nov 14, 2023).

我在使用 Python 进行 Dify API 请求时,发生了 Timeout 错误。以下是返回的 JSON 数据。
{"code": "completion_request_error", "message": "Timeout:Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60.0)", "status": 400}
这个错误是较为偶然的,似乎没有什么复现的方法。
1.请求时使用的是国内网络,没有代理国外
2.请求体符合规范,传参正确
3.OPEN API KEY 余额充足
若有了解的烦请回复。

I encountered a timeout error while making a Dify API request using Python. The following is the JSON data returned.

{"code": "completionrequest_error", "message": "Timeout: Request timed out: HTTPS ConnectionPool (host='api. openai. com ', port=443): Read timed out. (read timeout=60.0)", "status": 400}

This error is quite accidental and there seems to be no way to reproduce it.

  1. The request was made using a domestic network and did not represent foreign countries

  2. The request body meets the specifications and the parameters are transmitted correctly

  3. OPEN API KEY with sufficient balance

If you have any understanding, please reply.Thank you.

Originally created by @WrunDorry on GitHub (Nov 14, 2023). 我在使用 Python 进行 Dify API 请求时,发生了 Timeout 错误。以下是返回的 JSON 数据。 {"code": "completion_request_error", "message": "Timeout:Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60.0)", "status": 400} 这个错误是较为偶然的,似乎没有什么复现的方法。 1.请求时使用的是国内网络,没有代理国外 2.请求体符合规范,传参正确 3.OPEN API KEY 余额充足 若有了解的烦请回复。 ------ I encountered a timeout error while making a Dify API request using Python. The following is the JSON data returned. {"code": "completionrequest_error", "message": "Timeout: Request timed out: HTTPS ConnectionPool (host='api. openai. com ', port=443): Read timed out. (read timeout=60.0)", "status": 400} This error is quite accidental and there seems to be no way to reproduce it. 1. The request was made using a domestic network and did not represent foreign countries 2. The request body meets the specifications and the parameters are transmitted correctly 3. OPEN API KEY with sufficient balance If you have any understanding, please reply.Thank you.
yindo closed this issue 2026-02-21 17:28:03 -05:00
Author
Owner

@takatost commented on GitHub (Nov 17, 2023):

In China, the OpenAI API should be blocked. We can try deploying it on overseas servers to see if it can be replicated.

@takatost commented on GitHub (Nov 17, 2023): In China, the OpenAI API should be blocked. We can try deploying it on overseas servers to see if it can be replicated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#692