Persistent 300s Read Timeout with OpenAI-API-Compatible provider #35246
Unanswered
caomuyunshui
asked this question in
Help
Replies: 1 comment 2 replies
-
|
Hi @caomuyunshui! I'm Dosu and I’m helping the dify team. The 300-second timeout comes from Dify's plugin daemon architecture, which mediates all model provider invocations. The key environment variable is To fix this, add these environment variables to both your # Core timeout settings (must be kept in sync)
PLUGIN_DAEMON_TIMEOUT=1200
PLUGIN_MAX_EXECUTION_TIMEOUT=1800
# HTTP request timeouts
HTTP_REQUEST_MAX_CONNECT_TIMEOUT=3600
HTTP_REQUEST_MAX_READ_TIMEOUT=1800
HTTP_REQUEST_MAX_WRITE_TIMEOUT=1800
# Server timeouts
GUNICORN_TIMEOUT=600
# If using Nginx
NGINX_PROXY_READ_TIMEOUT=1800s
NGINX_PROXY_SEND_TIMEOUT=1800sThen restart all containers: docker-compose down && docker-compose up -dImportant notes:
To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I am using Dify version 1.13.0. I have configured an LLM node using the "OpenAI-API-Compatible" model provider.
The Issue:
My backend model is running on Moore Threads S80 GPUs. Due to the hardware characteristics, the prefill stage (processing the prompt) takes an exceptionally long time. Consequently, I am constantly encountering the following timeout error:
error type: InvokeConnectionError
error message: [models] Connection Error, HTTPConnectionPool(host='192.168.12.174', port=8080): Read timed out. (read timeout=300)
What I've tried:
I have attempted to adjust the relevant environment variables to increase the timeout limit, but it seems ineffective. The system strictly enforces the 300-second timeout.
Question:
Is there a specific configuration file or parameter I am missing? How can I extend the timeout beyond 300s to accommodate the long prefill time?
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions