dify icon indicating copy to clipboard operation
dify copied to clipboard

An error occurred when setting the API key for the model provider,TimeoutError: Request timed out: POST

Open A-Hao-Cheng opened this issue 11 months ago • 9 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Image

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

A-Hao-Cheng avatar Feb 28 '25 07:02 A-Hao-Cheng

@A-Hao-Cheng Hello there! I'm here to help you with any bugs, questions, or contributions you have for the project. I'm ready to assist you while we wait for a human maintainer.

I found a similar unsolved discussion regarding a "request timed out" issue when saving the model in Dify [1]. This might be related to the TimeoutError you're experiencing when setting the API key.

For your specific issue, the timeout for API requests in Dify is configured in the api/core/tools/custom_tool/tool.py file. The default timeout values are set using the API_TOOL_DEFAULT_TIMEOUT variable, which includes a 10-second connect timeout and a 60-second read timeout [2]. You might want to check if these settings are appropriate for your environment or if they need adjustment.

Additionally, ensure that your network conditions are stable and that there are no firewall or proxy settings interfering with the API requests. If the issue persists, consider increasing the timeout values to see if it resolves the problem.

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] avatar Feb 28 '25 07:02 dosubot[bot]

Like the problem I encountered, the issue I encountered was that adding the model configuration address would time out. You can check my issues:https://github.com/langgenius/dify/issues/14331

xuesd avatar Feb 28 '25 08:02 xuesd

Image The same issue: unable to add the model. Tried several times, but none worked. The system has also been restarted.

kanxue-team avatar Feb 28 '25 15:02 kanxue-team

@A-Hao-Cheng 您好同样的问题,请问解决了吗

dukun1224 avatar Mar 01 '25 08:03 dukun1224

also have the same serious issue. Has it been resolved ??

52learn avatar Mar 01 '25 10:03 52learn

Me too.

taozhan18 avatar Mar 03 '25 14:03 taozhan18

+1

sevck avatar Mar 06 '25 10:03 sevck

same

niushaoshuai avatar Mar 07 '25 06:03 niushaoshuai

解决办法 #14603

sevck avatar Mar 11 '25 02:03 sevck